Code now skips defective XML files