wrote error dialog