fixed logging of response code