added number of active threads to account for (filelen < number of total threads)