Aggregate file list before handing tasks to threads