Writing to XML works