Updates to IO ops to get REPL working

One remaining issue is that a stack of exceptions are printed after a parse error.