re-write Response.end() instead of Response.write()