Very slow version of fileSorter