Changed xhook.js so when the response is written the whole response is written to the facade.