Add killing logic to stop command.