Added log for commands
Fixed logging