Extract target file finding logic to TargetFinder