Add logging in commands
Fix code style
Fix confirm_events function
Add stop logging in redirector