A handful of small fixes

...improving debug logging, and preventing the REPL from going into a zombie state if ^D is pressed (instead, it's just ignored--use `exit` to return the SBT).