Lusin's Theorem, Modes of Convergence Background Information:

Theorem 1.18 - If $E\in M_{\mu}$, then \begin{align*}
\mu(E) &= \inf\{\mu(U):E\subset U, U \ \text{open}\}\\
&=\sup\{\mu(K):E\subset K, K \ \text{compact}\}\end{align*}
Theorem 2.26 - If $f\in L^1(\mu)$ and $\epsilon > 0$, then 
a.) there is an integrable simple function $\phi = \sum_{1}^{n}a_j\chi_{E_j}$ such that $\int |f - \phi|d\mu < \epsilon$.
b.) If $\mu$ is a Lebesgue-Stieltjes measure on $\mathbb{R}$, the sets $E_j$ in the definition of $\phi$ can be taken to be finite unions of open intervals.
c.) Moreover, in situation b.), there is a continuous function $g$ that vanished outside a bounded interval such that $\int |f - g|d\mu < \epsilon$.
Corollary 2.32 - If $f_n\rightarrow f$ in $L^1$, there is a sub-sequence $\{f_{n_j}\}$ such that $f_{n_{j}}\rightarrow f$ a.e.
2.33 Egoroff's Theorem - Suppose that $\mu(X) < \infty$, and $f_1,f_2,\ldots$ and $f$ are measurable complex-valued functions on $X$ such that $f_n\rightarrow f$ a.e. Then for every $\epsilon  > 0$ there exists a set $E\subset X$ such that $\mu(E) < \epsilon$ and $f_n\rightarrow f$ and $f_n\rightarrow f$ uniformly on $E^c$. 

Question:

Lusin's Theorem - If $f:[a,b]\rightarrow \mathbb{C}$ is Lebesgue measurable and $\epsilon > 0$, there is a compact set $E\subset [a,b]$ such that $\mu(E^c) < \epsilon$ and $f|E$ is continuous.

Attempted proof - Let $f:[a,b]\rightarrow\mathbb{C}$ be Lebesgue measurable and $\epsilon > 0$. By theorem 2.26 we can build a sequence of continuous functions $\{g_n\}$ such that $$g_n\rightarrow f \ \text{in} \  L^1$$ Then by Corollary 2.32 there is a sub-sequence $\{f_{n_j}\}$ of $\{g_n\}$ such that $f_{n_j}\rightarrow f$ a.e. 
Now, by Egoroff's theorem there exists a set $E$ with $\mu(E) < \infty$ such that $g_n\rightarrow f$ uniformly on $X\setminus E$. Note since $\{f_{n_j}\}$ is a sub-sequence of $\{g_n\}$ then we have $f_{n_j}\rightarrow f$ uniformly on $X\setminus E$ as well. Now by theorem 1.18 we can take $E$ to be a compact subset of $[a,b]$ since $K$ is compact and $E\subset K$. Note that $X\setminus E$ is the space on which $g_n\rightarrow f$ uniformly so then $E^c$ must be part of that space where $g_n\rightarrow f$ uniformly and thus $\mu(E^c) < \epsilon$ by definition. Finally since $\{g_n\}$ are continuous functions and $g_n\rightarrow f$ uniformly on $X\setminus E$ then $f$ is continuous. 
I am not sure this is exactly correct, any suggestions is greatly appreciated.
 A: @Wolfy , you proof is essentially correct, but it has some confusion in terms of notation. Also it need some improvement inthe very last part. I have copied you proof, making the necessary adjustments. 

Lusin's Theorem - If $f:[a,b]\rightarrow \mathbb{C}$ is Lebesgue measurable and $\epsilon > 0$, there is a compact set $E\subset [a,b]$ such that $\mu(E^c) < \epsilon$ and $f|E$ is continuous.

Proof - Let $f:[a,b]\rightarrow\mathbb{C}$ be Lebesgue measurable and $\epsilon > 0$. 
Since $f$ is finite and $\mu([a,b])<\infty$, there is $K>0$ such that $\mu(\{x \in [a,b] : |f(x)|>K \})< {\epsilon}/{4}$. Let 
$$ H= \{x \in [a,b] : |f(x)|>K \}$$
we have that $\mu(H)< {\epsilon}/{4}$ and $f\chi_{H^c}: [a,b] \rightarrow \mathbb{C}$ is in $L^1[a,b]$.
By theorem 2.26 we can build a sequence of continuous functions $\{g_n\}$ such that $$g_n\rightarrow f\chi_{H^c} \ \text{in} \  L^1$$ 
Then by Corollary 2.32 there is a sub-sequence $\{g_{n_j}\}$ of $\{g_n\}$ such that $g_{n_j}\rightarrow f\chi_{H^c}$ a.e.. 
Now, by Egoroff's theorem, for any $\epsilon >0$, there exists a set $G\subset [a,b]$, with $\mu(G) < \epsilon/4$ such that $g_{n_j}\rightarrow f\chi_{H^c}$ uniformly on $G^c$. 
(Atention: we can apply to Egoroff's theorem to the subsequence $g_{n_j}$, because we have that  $g_{n_j}\rightarrow f\chi_{H^c}$ a.e.).
Let $F = H \cup G$. We have then 
$$\mu(F) \leqslant \mu(H) +\mu(G)= \epsilon/4 + \epsilon/4= \epsilon/2$$
and, since $F^c= H^c \cap G^c$, we have that $g_{n_j}\rightarrow f$ uniformly on $F^c$. 
Now by theorem 1.18, since $\mu([a,b])<\infty$, there is  $E$ a compact subset of $[a,b]$, such that $E\subset F^c$ and 
$$\mu(F^c)-\epsilon/2 < \mu(E)\leq \mu(F^c)$$
So $F \subset E^c$ and we have 
\begin{align*}\mu(E^c) &=\mu(F)+\mu( E^c \setminus F)= \\&= \mu(F)+\mu( E^c \cap F^c)= \\& = \mu(F)+\mu( F^c \setminus E)=\\&=\mu(F)+(\mu( F^c)- \mu(E)) \leq \\ & \leq \frac{\epsilon}{2}+\frac{\epsilon}{2} =\epsilon
\end{align*}
Note that, since $E\subset F^c$ and $g_{n_j}\rightarrow f$ uniformly on $F^c$, we have that $g_{n_j}\rightarrow f$ uniformly on $E$. 
Since, for all $j$, $g_{n_j}$ is continuous, we have that $f$ is continuous on $E$, that is $f|_E$ is continuous. 
Remark: Here is a detailed proof that "Since $f$ is finite and $\mu([a,b])<\infty$, there is $K>0$ such that $\mu(\{x \in [a,b] : |f(x)|>K \})< {\epsilon}/{4}$"
Proof: For each $K\in\mathbb{N}$, let $A_K=\{x \in [a,b] : |f(x)|>K \}$. So $\{A_K\}_{K\in\mathbb{N}}$ is a non-increasing sequence of mensurable set. Since $f$ is finite, $\bigcap_{K\in\mathbb{N}}A_K=\emptyset$. Then, since $\mu([a,b])<\infty$, we have that 
$$\lim_{K \to \infty}\mu(A_K) = \mu \left (\bigcap_{K\in\mathbb{N}}A_K\right)=\mu(\emptyset)=0$$
So, given any $\epsilon>0$, there is $K>0$ such that $\mu(\{x \in [a,b] : |f(x)|>K \})< {\epsilon}/{4}$ 
