Tidy up some logging