changed to use close() from node-webkit Window