Why not just: `if (this._closeCleanup) this.app.close(fn);` ?