Working XML saving