added a cleanup phase before shutting down
added logging
bumped version