Again, may want to note that this writes the tree and all sub-trees.