(8) If requested by any party on or before the close of evidence in a contested hearing, the permanent court order awarding child custody shall set forth specific findings of fact as to the basis for the judge’s decision in making an award of custody including any relevant factor relied upon by the judge as set forth in paragraph (3) of this subsection. Such order shall set forth in detail why the court awarded custody in the manner set forth in the order and, if joint legal custody is awarded, a manner in which final decision making on matters affecting the child’s education, health, extracurricular activities, religion, and any other important matter shall be decided. Such order shall be filed within 30 days of the final hearing in the custody case, unless extended by order of the judge with the agreement of the parties.