More error handling, EOF no longer crashes REPL