Results are traversed sorted by filename in finalfn function