cleaning up logging etc