Shutdown server properly on ctrl-c