cleans up logging