added xml error check to the initial load of the xml