Added function to tell if file opened was a plain text file