The first string is printed correctly. But then instead of waiting for character from the terminal window (as I would expect) it keeps printing a garbage token. Why ? How do I get the program to wait and read a character when I send it from the terminal ?