Double .xml extension and crash on incorrect file fixed