add a confirmation dialog when trying to quit the application while it is operating