static void MyHandler(object sender, UnhandledExceptionEventArgs args) { System.IO.File.Create("success.txt"); }