Adds smart stop control by keeping state of active controls. Extracts method for logging.