write xml file