Adding error dialog