fix file grouping (sort order matters)