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.
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
(2) if a standing trustee appointed under section 1202(c) [1] of this title is serving in the case, the percentage fee fixed for such standing trustee under section 1202(d) of this title.
Except as otherwise provided in the plan or in the order confirming the plan, the trustee shall make payments to creditors under the plan.
(Added and amended Pub. L. 99–554, title II, § 255, title III, § 302(f), Oct. 27, 1986, 100 Stat. 3111, 3124; Pub. L. 103–65, § 1, Aug. 6, 1993, 107 Stat. 311; Pub. L. 103–394, title V, § 501(d)(36), Oct. 22, 1994, 108 Stat. 4147; Pub. L. 105–277, div. C, title I, § 149(a), Oct. 21, 1998, 112 Stat. 2681–610; Pub. L. 106–5, § 1(1), (2), Mar. 30, 1999, 113 Stat. 9; Pub. L. 106–70, § 1, Oct. 9, 1999, 113 Stat. 1031; Pub. L. 107–8, § 1, May 11, 2001, 115 Stat. 10; Pub. L. 107–17, § 1, June 26, 2001, 115 Stat. 151; Pub. L. 107–170, § 1, May 7, 2002, 116 Stat. 133; Pub. L. 107–171, title X, § 10814(a), May 13, 2002, 116 Stat. 532; Pub. L. 107–377, § 2(a), Dec. 19, 2002, 116 Stat. 3115; Pub. L. 108–73, § 2(a), Aug. 15, 2003, 117 Stat. 891; Pub. L. 108–369, § 2(a), Oct. 25, 2004, 118 Stat. 1749; Pub. L. 109–8, title X, § 1001(a)(1), (c), title XV, § 1502(a)(9), Apr. 20, 2005, 119 Stat. 185, 186, 217.)