fix event times
shutdown correctly
cleanup logging
prevent early ctrl-C