this should be wrapped as a try/finally{ scanner.close(); }