Cleaning up error logging.