finish xml file IO