Move createFilesFromTree and hash into util bag