Fixing FxCop double dispose warning
XmlWriter now actually closes stream instead of just potentially closing it
Merge pull request #1997 from christav/fixing-fxcop-error

Fixing FxCop double dispose warning