function setAppQuitHandler() {
        resetAppQuitHandler();
        DocumentCommandHandlers.on(APP_QUIT_CANCELLED, dirtyFileSaveCancelled);
    }
Registers the App Quit event handler, in case of dirty
file save cancelled scenario, while Auto Update is scheduled to run on quit