Cleanup of logging functions