public async Task Run(string txtCaseNr, Action <string, MessageLevels, string> notify)
        {
            _notify = notify;
            var caseNr = txtCaseNr?.Trim().Replace("_", "") + "";

            if (!string.IsNullOrEmpty(caseNr))
            {
                caseNr += "_";
            }
            Settings.ApplicatonBaseName = "QlikViewCollector";
            var resultPathRutine = new GetOutputFolder().FallbackRutine(Settings.ApplicatonBaseName);

            Settings.LogFilePath      = Path.Combine(resultPathRutine, "QvCollector.log");
            Settings.OutputFolderPath = resultPathRutine;
            Log.Init(Settings.LogFilePath);//todo: remove and move into local log implimentation. Warning init with empty string will create a device zero logging.
            _logger.Add($"started with version {Application.ProductVersion}");
            _notify("Connecting to QlikView Installation", MessageLevels.Animate, "Connecting");

            CollectorService = new QlikViewCollectorService(_logger, _notify, DoneAction)
            {
                ConnectToApiManuallyDlg = ShowConnectionFailuresDialogue,
                PathToLogFolderDlg      = ShowLogFolderDialogue,
                PathToArchivedLogsDlg   = ShowArchivedLogsFolderDialogue,
            };
            //_settings.StartDateForLogs = _startDate;
            //_settings.StopDateForLogs = _stopDate;
            Settings.UseOnlineDelivery = false; //chkOnline.Checked;
            Settings.AllowRemoteLogs   = FreyrCollectorCommon.Common.Settings.AllowRemoteLogs;
            Settings.AllowArchivedLogs = FreyrCollectorCommon.Common.Settings.AllowArchivedLogs;

            Settings.AllowSenseInfo        = FreyrCollectorCommon.Common.Settings.AllowSenseInfo;
            Settings.DnsHostName           = (Dns.GetHostEntry(Dns.GetHostName()).HostName).ToLower();
            Settings.CustomerKey           = "";
            Settings.Key                   = caseNr;
            Settings.QvSettings.QmsAddress = $"http://{Settings.DnsHostName}:4799/QMS/Service";

            try
            {
                await CollectorService.Start(Settings).ConfigureAwait(false);
            }
            catch (Exception ex)
            {
                Log.Add("Failed accessing installation.", ex);
                DoneAction.Invoke(@"Failed accessing installation.", @"We unfortunately had a problem reading the QlikView installation. You will have to manually send us your logs.", CollectorService);
            }
        }