adding the error message dialog