I think I did this right.
Suppose that $F\in \mathcal{M}$ and that $\{f_n\}$ is a sequence of measurable functions that converge to a limit $a.e.$. Let $f=\lim f_n$ on $F$ and $0$ on $F^c$ where $F^c$ is null. Then $$\{x:\lim f_n=\pm \infty\}=\cap_{M\in\mathbb{N}}\{x:\lim f_n(x)>M\}\cup \cap_{M\in\mathbb{N}}\{x:\lim f_n(x)<-M\}$$ and each set is measurable since for instance $$\{x:\lim f_n(x)>M\}=\bigcup_{n=1}^\infty\bigcap_{i=n}^\infty\{x:f_i(x)>M\}. $$ Thus, $$\{x:\lim f_n(x)\}=(\{x:\limsup f_n(x) -\liminf f_n(x)\leq 0 \}\cap \{x:\limsup f_n(x) -\liminf f_n(x)\geq 0 \})\cup \{x:\lim f_n=\pm \infty\}.$$
is measurable and on if $B$ borel, then $$f^{-1}(B)\cap F=\limsup f_n^{-1} (B)\cap F\in \mathcal{M}$$ and either $$f^{-1}(B)\cap F^c=f^{-1}(0)\cap F^c=F^c\in\mathcal{M}$$ or $$f^{-1}(B)\cap F^c=\emptyset\in\mathcal{M}.$$
Thus $f$ is measurable on $F$ and $F^c$. Since $$f^{-1}(B)=f^{-1}(B)\cap F\cup f^{-1}(B)\cap F^c$$ $f$ is measurable.