Replace bufio.ReadString('\n') with Scanner