Revert "Revert "split FileManager from ExternableTreeSet to be a more general solution""

This reverts commit 9a87efaa82e6be8a986c78705f6df28676312f59.