Added code to make it open all files in the list of files