static WeatherRateProvider() { var path = Path.Combine(Environment.CurrentDirectory, "Plugins\\ExBuddy\\Data\\" + WeatherRateIndexFileName); if (File.Exists(path)) { DataFilePath = path; } else { DataFilePath = Directory.GetFiles(PluginManager.PluginDirectory, "*" + WeatherRateIndexFileName, SearchOption.AllDirectories) .FirstOrDefault(); } Instance = new WeatherRateProvider(DataFilePath); }