the difference is whether you want to go ahead and append the new fragment if the original file itself is not valid xml  or just abort  it seems like if that happens you have other problems  and adding some new junk to the end of the file is not going to help  i do not have a strong opinion about this  though  so i am happy to change it if you think the other behavior is better 