// If mock is enabled we skip the console readline.
        public static void Load(bool mocked = false)
        {
            m_Mocked = mocked;
            var updated = false;

            if (File.Exists(m_FilePath))
            {
                Core.WriteConsole($"Reading server configuration from {m_RelPath}...");
                m_Settings = JsonConfig.Deserialize <ServerSettings>(m_FilePath);

                if (m_Settings == null)
                {
                    Utility.PushColor(ConsoleColor.Red);
                    Console.WriteLine("failed");
                    Utility.PopColor();
                    throw new FileNotFoundException($"Failed to deserialize {m_FilePath}.");
                }

                Utility.PushColor(ConsoleColor.Green);
                Console.WriteLine("done");
                Utility.PopColor();
            }
            else
            {
                updated    = true;
                m_Settings = new ServerSettings();
            }

            if (mocked)
            {
                return;
            }

            if (m_Settings.DataDirectories.Count == 0)
            {
                updated = true;
                m_Settings.DataDirectories.AddRange(GetDataDirectories());
            }

            if (m_Settings.Listeners.Count == 0)
            {
                updated = true;
                m_Settings.Listeners.AddRange(GetListeners());
            }

            if (m_Settings.Expansion == null)
            {
                var expansion    = GetSetting <Expansion>("currentExpansion");
                var hasExpansion = expansion != null;

                expansion ??= GetExpansion();

                if (expansion <= Expansion.ML && !hasExpansion)
                {
                    SetPre6000Support();
                }

                updated = true;
                m_Settings.Expansion = expansion;
            }

            Core.Expansion = m_Settings.Expansion.Value;

            if (updated)
            {
                Save();
                Utility.PushColor(ConsoleColor.Green);
                Core.WriteConsoleLine($"Server configuration saved to {m_RelPath}.");
                Utility.PopColor();
            }
        }