Adding callback to command execution