ExitRepl: Call LogMode only when logging is actually turned on