Egoroff's Theorem problem (Folland Real Analysis Ex 40) 
The problem is to show that the theorem holds if we replace the condition that $\mu(X)<\infty$ with $|f_n|\leq g$ for all $n\ge 1$, and $g\in L^1$.
I have completed half the problem but I am stuck on the other half. This is what I have so far
Let $\epsilon>0$. For $N\geq1$, define
$$G_N = \{x\;|\;g(x)\geq N^{-1}\}.$$
Then, since $g\in L^1$, we have $\mu(G_n)$ is finite. Now, we can apply the original Egoroff's theroem, and get that there exists $E_N \subset G_N$ s.t. $\mu(E_N)<\frac{\epsilon}{2^N}$ and $f_n$ converges uniformly to $f$ on $G_N \setminus E_N.$
Let
$$E=\bigcup_{N=1}^{\infty} E_N.$$
Then
$$ \mu(E)\leq \displaystyle \sum \mu(E_N)=\epsilon$$
This is where I am stuck, I don't know how to show the uniform convergence on $E^c$. Clearly $f_n$ converges uniformly to $f$ on $G^c$, where $\displaystyle G=\bigcup_{N=1}^{\infty} G_N$. So, at this point it would be enough to show uniform convergence on $G\setminus E$.
On any finite union of the $G_k \setminus E_k$ we have uniform convergence, so I imagine we need to use that. The one idea I have had is this:
Define $$h_n(x)=\chi_{\bigcup\limits_{a=1}^n E_a \setminus G_a}(x)f(x)$$
The idea is to show that $h_n \rightarrow f$ uniformily, which, I think would be equivalent to showing that $f_n \rightarrow f$ uniformily, since $f_n \rightarrow f$ on every finite union of these sets, and also $h_n$ is in a sense equivalent to f restricted to $\displaystyle \bigcup_{a=1}^n E_a \setminus G_a$. (please check this logic)
Let $\epsilon > 0$. Then, if $x\in \displaystyle\bigcup_{a=1}^N E_a \setminus G_a$ for some $N$, $|h_n(x)-f(x)|=0<\epsilon$ for all $n\geq N$.
However, if $x$ is not in that union, then we need to show that $|f|<\epsilon$. However, all we know is that $|f|\leq g$. We do know that $g(x)\geq N^{-1}$ by construction but this doesn't seem helpful. What seems more helpful is that $g\in L^1$, and hence
$$\int_E g < \infty$$
For any subset $E\subset X$. Perhaps we could use this? Although I don't know how.
 A: Here's a hint: define a new measure $\nu$ by $\nu(E) = \displaystyle \int_E g \, d\mu$. Then $\nu$ is a finite measure and $\mu(E) = 0 \implies \nu(E) = 0$ so that $f_n \to f$ $\nu$-almost everywhere. Thus given $\delta > 0$ there exists a set $E$ with $\nu(E) < \delta$ and $f_n \to f$ uniformly on $E^c$. Can you select $\delta$ appropriately so that $f_n \to f$ uniformly off a set of small measure?
Here's another hint: although $\nu(E)$ is small, $\mu(E)$ may not be: $g$ could be zero on a very large set, but $f_n \to f$ uniformly there already.
A: We can use your idea but take a simpler approach.  Let
$F_m^n=\bigcap_{i \geq n}\{x : |f(x)-f_i(x)| < \frac{1}{m} \}$.  Then by pointwise convergence we have $\bigcup_n F_m^n=X$.  Since $F_m^{n} \subset F_m^{n+1}$ we can use continuity of measure to get a large enough $N(m)$ so that $\mu(X-F_m^{N(m)}) \leq \frac{\epsilon}{2^m}$.  Now let $N_{\epsilon}=\bigcup_m(X-F_m^{N(m)})$.  We can see that $\mu(N_{\epsilon}) \leq \epsilon$ and that $i>N(m)$ implies $d(f_i(x),f(x)) < \frac{1}{m}$ for $x \notin N_{\epsilon}$.
The idea is that $N_{\epsilon}$  contains all the bad points and we can remove them to make everything else uniformly convergent.  Notice also that continuity of measure is the work horse behind this theorem.  It's the reason why we can make $\epsilon$ as small as we want.
