add timeout watchdog and kill subprocesses gracefully