This kind of small tricks used in organic synthesis is very common. DMF is used as catalyst. SOCl2 or C2O2Cl2 reacts with DMF first to form very active species then reacts with acid. You could find mechanism from ecompound.com, reaction reference, reaction mechanism, S to Z, reactions without name. This mechanism is similar to Vilsmeier (A. Vilsmeier) -Haack (A. Haack) reagent mechanism.
Another trick is using organic base to catalyze POCl3 chlorination of heterocycle ring.
Good luck!