corrected a typo for opening the file when a single string is passed