Iterated integrals on affine curves