fixed bugs in XML_File functions