private static ReflectInsightConfig GetActiveApplicationConfig(ReflectInsightConfig appConfig, out string activeFileName)
        {
            activeFileName = AppConfigFullFileName();

            if (appConfig == null)
            {
                return(null);
            }

            var externalConfigSource = appConfig.GetAttribute(".", "externalConfigSource", string.Empty);

            if (!string.IsNullOrWhiteSpace(externalConfigSource))
            {
                var fullPathConfigFile = RIUtils.DetermineParameterPath(externalConfigSource);
                if (string.IsNullOrWhiteSpace(Path.GetDirectoryName(externalConfigSource)))
                {
                    fullPathConfigFile = string.Format("{0}{1}", AppDomain.CurrentDomain.BaseDirectory, externalConfigSource);
                }

                // just in case someone is trying to play smart by assigning the external source name
                // to the App Config file name, just ignore and assume the app config file only

                if (fullPathConfigFile.ToLower() != AppConfigFullFileName().ToLower())
                {
                    appConfig      = ReadAndCreateConfigObject(fullPathConfigFile);
                    activeFileName = fullPathConfigFile;
                }
            }

            return(appConfig);
        }