(a) A custodian with knowledge of the commencement of a case under this title concerning the debtor may not make any disbursement from, or take any action in the administration of, property of the debtor, proceeds, product, offspring, rents, or profits of such property, or property of the estate, in the possession, custody, or control of such custodian, except such action as is necessary to preserve such property.
(b) A custodian shall—
(1) deliver to the trustee any property of the debtor held by or transferred to such custodian, or proceeds, product, offspring, rents, or profits of such property, that is in such custodian’s possession, custody, or control on the date that such custodian acquires knowledge of the commencement of the case; and
(2) file an accounting of any property of the debtor, or proceeds, product, offspring, rents, or profits of such property, that, at any time, came into the possession, custody, or control of such custodian.
(c) The court, after notice and a hearing, shall—
(1) protect all entities to which a custodian has become obligated with respect to such property or proceeds, product, offspring, rents, or profits of such property;
(2) provide for the payment of reasonable compensation for services rendered and costs and expenses incurred by such custodian; and
(3) surcharge such custodian, other than an assignee for the benefit of the debtor’s creditors that was appointed or took possession more than 120 days before the date of the filing of the petition, for any improper or excessive disbursement, other than a disbursement that has been made in accordance with applicable law or that has been approved, after notice and a hearing, by a court of competent jurisdiction before the commencement of the case under this title.
(d) After notice and hearing, the bankruptcy court—
(1) may excuse compliance with subsection (a), (b), or (c) of this section if the interests of creditors and, if the debtor is not insolvent, of equity security holders would be better served by permitting a custodian to continue in possession, custody, or control of such property, and
(2) shall excuse compliance with subsections (a) and (b)(1) of this section if the custodian is an assignee for the benefit of the debtor’s creditors that was appointed or took possession more than 120 days before the date of the filing of the petition, unless compliance with such subsections is necessary to prevent fraud or injustice.