this error handling can be removed as you removed the XML loading just before