clean up TH runner after error and other fixes