A highly selective photochemical chlorination of esters, amides, and alcohols can be carried out in $70-90 \% \mathrm{H}_{2} \mathrm{SO}_{4}$ using $N$-chlorodialkylamines as the chlorinating agents. Mechanistic study indicates that the reaction occurs by the following chain sequence:
A very interesting feature of the reaction is that the chlorine is introduced with high selectivity at the next-to-terminal position for molecules with $n=4$ to 6. In contrast, chlorination in nonpolar solvents does not show comparable selectivity. Rationalize these observations.