Added the function from the sample thread file. Adding code to create an array of threads, one thread per input file