while (true) loop executing once more after break statement when reading file I’m trying to read a file that has this format: