Added a dialog box for error messages