adding shutdown hook to kill server.