public TabMonAgent(bool loadOptionsFromConfig = true) { // Initialize log4net settings. var assemblyLocation = Assembly.GetExecutingAssembly().Location; Directory.SetCurrentDirectory(Path.GetDirectoryName(assemblyLocation)); XmlConfigurator.Configure(new FileInfo(ConfigurationManager.AppSettings[Log4NetConfigKey])); // Load TabMonOptions. In certain use cases we may not want to load options from the config, but provide them another way (such as via a UI). options = TabMonOptions.Instance; if (loadOptionsFromConfig) { TabMonConfigReader.LoadOptions(); } }