Fix command handler + logging of events and commands