Change error catching in XML