Modified read_file to work only if  is a file.