Section 39F. When an application for assistance stating the a child and family are in need of assistance is initiated the child shall be informed that he has a right to counsel at all hearings, and if said child is not able to retain counsel, the court shall appoint counsel for said child. The clerk shall cause a copy of the application for assistance and notice of the time and place of the any scheduled hearing or proceeding to be delivered to counsel at the time of appointment. When the application for assistance is filed, each parent, legal guardian or custodian of the child shall be informed of the right to be heard in any proceeding under sections 39E to 39I, inclusive, involving the child and that a parent or legal guardian has the right to counsel at any hearing or proceeding regarding custody of such child. If said parent or legal guardian is indigent, the court shall appoint counsel for said parent or legal guardian. The court shall determine whether the parent or guardian of a child stated to require assistance is indigent. If the court determines that the parent or guardian is not indigent, the court shall assess a $300 fee against the parent or guardian to pay for the cost of appointed counsel. If the parent is determined to be indigent but is still able to contribute toward the payment of some of said costs, the court shall order the parent to pay a reasonable amount toward the cost of appointed counsel.