Added clean shutdown to gen_tracker