static void Main(string[] args)
        {
            FileExec file = new FileExec();

            file.WatchDirectory();

            Task t1 = new Task(file.ProcessFiles);

            t1.Start();
            t1.Wait();
        }
        static void Main(string[] args)
        {
            FileExec file = new FileExec();

            file.WatchDirectory();

            Thread tr = new Thread(file.ProcessFiles);

            tr.Start();
            tr.Join();
        }