added an exit confirmation dialog before exiting the application