Instead of printing the error,  show an error dialog