Writing XML Response to file