write response to log on fail