Updates for terminating threads in tracker_heartbeat.py