Added option to cancel quitting (fixes #202)