fn wait_for_task_stopped(task_path: &Path) -> Result<()>