Added stopServer
Events for console exit