Add an option to send error to error_log, close #402