Added process.exit to server close function.