refactor: logging in commands through listener