Added try and exception statements to handle inconsistent information in xml files