remove setLeaf method from FileNode class