Changing the result to a new CommandResult in order to capture the output of the executed command.