Fix error checking of number of files in parameter-sweep