(a) The presence of the petitioner and the person to be adopted is not required at the hearing on the petition unless ordered by the court.
(b) The court may continue the hearing from time to time to permit further observation, investigation, or consideration of any facts or circumstances affecting the granting of the petition.
(c) If at the conclusion of the hearing the court determines that the required consents have been obtained or excused and that the adoption is in the best interest of the person to be adopted, it may issue a final decree of adoption.
(d) If the requirements for a decree under (c) of this section have not been met, the court shall dismiss the petition and determine, in the best interests of the minor, the person including the petitioner to have custody of the minor.