(2) The court shall direct that support payments be sent by the clerk to (i) the Department of Healthcare and Family Services if the person in whose behalf payments are made is receiving aid under Articles III, IV, or V of the Illinois Public Aid Code, or child support enforcement services under Article X of the Code, or (ii) to the local governmental unit responsible for the support of the person if he or she is a recipient under Article VI of the Code. In accordance with federal law and regulations, the Department of Healthcare and Family Services may continue to collect current maintenance payments or child support payments, or both, after those persons cease to receive public assistance and until termination of services under Article X of the Illinois Public Aid Code. The Department shall pay the net amount collected to those persons after deducting any costs incurred in making the collection or any collection fee from the amount of any recovery made. The order shall permit the Department of Healthcare and Family Services or the local governmental unit, as the case may be, to direct that support payments be made directly to the spouse, children, or both, or to some person or agency in their behalf, upon removal of the spouse or children from the public aid rolls or upon termination of services under Article X of the Illinois Public Aid Code; and upon such direction, the Department or the local governmental unit, as the case requires, shall give notice of such action to the court in writing or by electronic transmission.