Update MainForm.cs

added exception handler.