Adding dialog to exit.