Tidy up logging