attempt to kill threads upon program exit