Custom error logging.