Added some logging if the XHR fails.