In the event that a petition for approval of an instrument and the transfer of the custody and guardianship or care and custody of a child is filed within thirty days following removal of the child from his home and diligently pursued pursuant to section three hundred fifty-eight-a of this title, state reimbursement shall not be denied for expenditures made by a social services district for the care and maintenance of such a child away from his home prior to denial of such petition by a family court judge solely by reason of such denial.
N.Y. Soc. Serv. Law § 358-B