XmlWriter now actually closes stream instead of just potentially closing it