In an acute triangle $ABC$, the feet of the perpendiculars from $A$ and $C$ to the opposite sides are $D$ and $E$, respectively. The line passing through $E$ and parallel to $BC$ intersects $AC$ at $F$, the line passing through $D$ and parallel to $AB$ intersects $AC$ at $G$. The feet of the perpendiculars from $F$ to $DG$ and $GE$ are $K$ and $L$, respectively. $KL$ intersects $ED$ at $M$. Prove that $FM \perp ED$.