Added safe end of server after calling SIGINT