Adding clean shutdown - does final commit before stop() exits