Cleaning up of logging