When generating list of input files start from index 1; index 0 is the name of the program being executed.