Added scanner.hasNextLine()