public static void Main(string[] args)
        {
            if (!GetArgs(args))
            {
                PrintUsage();
                Environment.ExitCode = 1;
                return;
            }

            OpenSearchClient client = null;
            try
            {
                client = new OpenSearchClient();

                client.Initialize();

                if (baseUrlArg != null)
                    client.ProcessQuery();

                if (listOsee == true)
                    client.ListOpenSearchEngineExtensions();

                if (!string.IsNullOrEmpty(queryModelArg) && baseUrlArg == null)
                {
                    client.PrintDataModelHelp(DataModel.CreateFromArgs(queryModelArg, new NameValueCollection()));
                }

            }
            catch (AggregateException ae)
            {
                foreach (var e in ae.InnerExceptions)
                {
                    Console.Error.WriteLine(string.Format("{0} : {1} {2}", e.ToString(), e.Message, e.HelpLink));
                    if (verbose)
                        Console.Error.WriteLine(e.StackTrace);
                }
                Environment.ExitCode = 1;
                return;

            }
            catch (Exception e)
            {
                Console.Error.WriteLine(string.Format("{0} : {1} {2}", e.Source, e.Message, e.HelpLink));
                if (verbose)
                    Console.Error.WriteLine(e.StackTrace);
                Environment.ExitCode = 1;
                return;
            }
        }