improve log_error