Implement graceful shutdown of tracker.