Removed double-parsing of XML file, only check on exception.