public static Settings GetSettings()
        {
            Settings settings;

            try
            {
                string json = File.ReadAllText(settingsFilePath);
                settings = JsonConvert.DeserializeObject<Settings>(json);
            }
            catch
            {
                settings = new Settings();
                File.WriteAllText(settingsFilePath, JsonConvert.SerializeObject(settings));
            }

            return settings;
        }
        private static void ProcessTeams(List<ShooterStageData> results, List<TeamData> teams, Settings settings)
        {
            List<TeamResult> finalResults = new List<TeamResult>();
            List<string> missingShooters = new List<string>();
            foreach (var team in teams)
            {
                var scores = new List<ShooterStageData>();
                foreach (string shooterName in team.ShooterNames)
                {
                    ShooterStageData score = results.FirstOrDefault(s => CompareShootersNames(s.FullName, shooterName));

                    if (score != null)
                    {
                        scores.Add(score);
                    }
                    else
                    {
                        missingShooters.Add(shooterName);
                    }
                }

                finalResults.Add(new TeamResult(team.Name, scores));
            }

            if (missingShooters.Count > 0)
            {
                System.Console.WriteLine();
                System.Console.WriteLine("Missing shooters: ");

                foreach (var shooter in missingShooters)
                {
                    System.Console.WriteLine(shooter);
                }

                System.Console.WriteLine();
            }

            File.Copy(settings.TeamResultsTemplatePath, settings.TeamResultsPath, true);

            using (FileStream stream = File.Open(settings.TeamResultsPath, FileMode.Open, FileAccess.ReadWrite))
            {
                ExportTeamResultsAsExcel exporter = new ExportTeamResultsAsExcel();
                var s = exporter.Export(finalResults, stream);
            }

            string content = GenerateTextResults(finalResults);
            string path = Path.ChangeExtension(settings.TeamResultsPath, "txt");
            File.WriteAllText(path, content);
        }