Get program to loop through all files in a folder, instead of just reading one file