Need help with this custom command.

I tried making a simple plugin to add "Exit to Desktop" command in the option, derived from ARP_TitleCommandExit.

(function() {

var _Window_Options_makeCommandList = Window_Options.prototype.makeCommandList;
Window_Options.prototype.makeCommandList = function() {
_Window_Options_makeCommandList.call(this);
this.addCommand("Exit to Desktop", 'exitGame');
};
Scene_Options_createOptionsWindow = Scene_Options.prototype.createOptionsWindow;
Scene_Options.prototype.createOptionsWindow = function() {
Scene_Options_createOptionsWindow.call(this);
this._OptionsWindow.setHandler('exitGame', this.commandExitGame.bind(this));
};
Window_Options.prototype.commandExitGame = function() {
SceneManager.exit();
};

})();

It doesn't work. When the plugin load, the "Exit to Desktop" command shows up in the Options but it does nothing, also there's an error: "cannot read property 'setHandler' of undefined". What am I missing?
...also there's an error: "cannot read property 'setHandler' of undefined". What am I missing?
This error means this._OptionsWindow is not defined. Try _optionsWindow (lowercase 'o') instead, i.e.
Code:
this._optionsWindow.setHandler('exitGame', this.commandExitGame.bind(this));

Original thread: https://forums.rpgmakerweb.com/threads/need-help-with-this-custom-command.94563/