Try catch to open xml