(a) Payments and funds received by the trustee shall be retained by the trustee until confirmation or denial of confirmation of a plan. If a plan is confirmed, the trustee shall distribute any such payment in accordance with the plan. If a plan is not confirmed, the trustee shall return any such payments to the debtor, after deducting—
(1) any unpaid claim allowed under section 503(b) of this title; and
(2) if a standing trustee is serving in the case, the percentage fee fixed for such standing trustee.
(b) Before or at the time of each payment to creditors under the plan, there shall be paid—
(1) any unpaid claim of the kind specified in section 507(a)(2) of this title; and
(c) Except as otherwise provided in the plan or in the order confirming the plan, the trustee shall make payments to creditors under the plan.