private static void PrintFiles(string[] files = null, string procs = null) { foreach (var file in files) { var jsonText = File.ReadAllText(file); if (Cfg.FromJson(jsonText) is Cfg cfg) { PrintCfg(cfg, procs); } else if (TypeEnvironment.FromJson(jsonText) is TypeEnvironment tenv) { Log.WriteLine(tenv.ToString()); } else { Log.WriteError($"Input file {file} is not a cfg or tenv\n"); } } }