tidy the logging