Added fault tolerance for xml parsing