Don't use more threads than there are files