private bool TryStopSession(bool isFinalSession = false)
        {
            var success = false;

            logger.Info("Stopping current service session...");

            var communication = service.StopSession(sessionId.Value);

            if (communication.Success)
            {
                success = TryWaitForServiceEvent(serviceEventName);

                if (success)
                {
                    sessionId        = default(Guid?);
                    serviceEventName = default(string);
                    logger.Info("Successfully stopped service session.");
                }
                else
                {
                    logger.Error($"Failed to stop service session within {timeout_ms / 1000} seconds!");
                }
            }
            else
            {
                logger.Error("Failed to communicate session stop command to service!");
            }

            if (success && isFinalSession)
            {
                communication = service.RunSystemConfigurationUpdate();
                success       = communication.Success;

                if (communication.Success)
                {
                    logger.Info("Instructed service to perform system configuration update.");
                }
                else
                {
                    logger.Error("Failed to communicate system configuration update command to service!");
                }
            }

            return(success);
        }