find_gaps works also if not sorted filenams are passed