Question in the proof of Lusin's theorem. I want to prove Lusin's theorem.

Let $E\subset\mathbb R$ be a measurable set and $f:E\to\mathbb R$ be a measurable function. Then, for each $\epsilon$, there exists $F\subset E$ s.t. $F$ is closed about relative topology from $E$, $m^\ast(E\setminus F)<\epsilon$, $f|_F$ is continuous. ($m^\ast$ is Lebesgue outer measure.)

I've already understand the case $m^\ast(E)<\infty$, and I'm trying general case.
Hint is given : Consider $E_k:=E\cap[-k,k]$.

Let $E_k:=E\cap[-k,k]$.
For each $k\in\mathbb N$, $m^\ast(E_k)<\infty$ and $f|_{E_k}$ is measurable thus there is $F_k\subset E_k$ s.t. $F_k$ is closed about relative topology from $E_k$, $m^\ast(E_k\setminus F_k)<\epsilon/2^k$, $f|_{F_k}$ is continuous.
$F:=\cup_{k=1}^\infty F_k$, $E:=\cup_{k=1}^\infty E_k$.
Then $F\subset E$.
Since $E\setminus F\subset\cup_{k=1}^\infty (E_k\setminus F_k)$, I get $m^\ast(E\setminus F)\leqq\sum_k m^\ast(E_k\setminus F_k)\leqq\epsilon.$
Maybe what I did so far is correct, but this is not sufficient yet : I have to check
(i) $F$ is closed about relative topology from $E$.
(ii) $f|_F$ is continuous.
For (i), each $F_k$ is closed in $E_k$ but I don't know why $F=\cup_k F_k$ is closed in $E$. $F$ has to be written as $F=E\cap C$, where $C$ in closed in $\mathbb R$. I haven't found such $C$.
For (ii), each $f|_{F_k}$ is continuous but I don't think this guarantees the continuity of $f|_F$. I think that "each $f|_{A_k}$ is continuous $\Rightarrow$ $f|_{\cup_{k=1}^\infty}A_k$ is continuous" doesn't generally hold. (Maybe, I have to show $x_j\to x$ $\Rightarrow$ $f|_F(x_j)\to f|_F(x)$, but I don't know how.)
Postscript
Hint says $E_k:=E\cap[-k,k]$ but perhaps $E_k$ has to be defined s.t. $\{E_k\}$ is disjoint : e.g., $E_k=E\cap(k,k+1]$ or, $E_1=E\cap[-1,1]$, $E_k=E\cap([-k,k]\setminus[1-k,k-1])$ for $k\geqq 2.$
 A: EDIT: I see your postscript. I think defining $E_k=E\cap[k,k+1]$ is a much better idea, personally.

It is important to note that, with no loss of generality, $F_{n+1}\cap[-n,n]=F_n$ can be enforced for all $n\ge1$. This ensures $F$ is the colimit of $F_1\hookrightarrow F_2\hookrightarrow\cdots$ which is what we need for $f$ to be continuous, and also for $F$ to be closed. If you aren't comfortable with that language, ignore it!
$F$ is closed because $F\cap[-n,n]$ is a finite union of $F_1,F_2,\cdots,F_n$ which is closed, for every $n$. It follows $F\cap K$ is closed for every compact subset $K$ of $\Bbb R$ hence $F$ is closed, as $\Bbb R$ is compactly generated.
That's just one way to see it though. We can prove it more directly - suppose $(x_i)_{i\ge1}$ is a sequence of elements of $K$ converging to some $x\in\Bbb R$. If $n=\lceil x\rceil+1$, I know there is some $N$ that $i\ge N$ implies $x_i\in[-n,n]$, hence $x_i\in F_n$ for all $i\ge N$. Considering the sequence $y_j:=x_{j+N}$, we know $(y_j)_{j\ge1}$ is a sequence of elements of $F_n$ converging to $x$. Because this set is closed, I know $x\in F_n\subseteq F$. Thus, $x\in F$ - by the sequential criterion for closure of a set in a metric space, it follows $F$ is closed.
Why is $f$ continuous on $F$? Fix an $x\in F$ and $U$ an open neighbourhood of $f(x)$. I know $x\in F_n$ for some $n$, by definition of union. We may take $n>\lceil x\rceil+1$. Now, continuity of $f$ on $F_n$ implies there is some $1>\delta>0$ that $|y-x|<\delta$ and $y\in F_n$ implies $f(y)\in U$. If $y\in F$ and $|y-x|<\delta<1$, we know $y\in[-n,n]$ hence $y\in F_n$ holds, so this condition extends to: $y\in F$ and $|y-x|<\delta$ implies $f(y)\in U$. Since $U$ is arbitrary, we have $f$ continuous at $x$. Since $x$ is arbitrary, $f$ is continuous over all of $F$.
