Logging and shell improvements