Add wait for finish in LegacyIdTransformationService