Added logging of response as well