kill threads on keyboard interrupt, and on program error. Plus much