write file tree