XML writer: close after writing