avoiding NPE due to bad loading of xml files