Using gui.App.quit() instead of process.exit()

Same as last PR