Second follow up of ac61020

* Truly only logs command that are ran successfully.
* Improved command prefix stripping for logged commands.