added process.exit -> window.close