Return errors instead of logging.