Added more logging to handle_http_response method