log_error improvement