Added naive error handling when loading a XML