replaced read_whole_file() by getline()