Catching problem with badly formatted XML files