static void Main(string[] args) { var testError = new TestError(); testError.Init(); testError.Start(); Thread.Sleep(1000); testError.Stop(); //FOR FIX REPLACE LINES 22 AND 23 testError.Deinit(); //wait error unhandled Console.ReadLine(); }