split FileManager from ExternableTreeSet to be a more general solution