Added check for load_xml_file