repl: better error handling
graphics: use the current write stream
clean up