Khushal: Added a check for xml file