added for loop to run program over all files in fitslist