Added an error message box to the main form