Mod: use thread to wait for child instead