tidy up the logging