TITLE: The Scorza-Dragoni theorem as a consequence of Egorov's theorem?
QUESTION [5 upvotes]: Scorza-Dragoni theorem (at least the version I have used) says that if you have a function $f : \Omega \times \mathbb{R}^{N} \longrightarrow \overline{\mathbb{R}}$ which satisfies:
i) $x \rightarrow f(x,v)$ is measurable for all $v \in \mathbb{R}^{N}$
ii) $v \rightarrow f(x,v)$ is continuous for  almost every $x \in \Omega$
iii) $f$ is locally integrable
Then for any positive $\epsilon$ there exists a compact subset of $\Omega,$ say $K,$ such that $f$ restricted to $K \times \mathbb{R}^{N}$ is a continuous function and $\vert K^{c} \vert < \epsilon$
I tried to prove this before looking for it somewhere and came up with a stupidly simple proof, which confuses me, because if this were right, the theorem wouldn't have its own name :S
My reasoning is: As we have a measurable function, we can approximate it pointwise by step functionts which, in turn, can be approximated pointwise by continuous functions almost everywhere. Theorefore, by Egorov's theorem we can find $K$ such that $\vert K^{c} \vert < \epsilon$ and such that those continuous functions converge uniformly. The limit on $K$ is then continuous and clearly coincides with the restriction of $f.$
There must be some subtle technical point I am omiting, because I guess the proof of a named theorem cannot be this silly. Where is my mistake?
Thanks for your help 
EDIT: Added the almost everywhere that was missing

REPLY [2 votes]: You are applying Egoroff's theorem to the function $x \mapsto f(x,y)$. This means that you get a compact set $K_y$ for which $f(\cdot,y) \colon K_y \to \mathbb{R}$ is continuous. Since the compact set depends on $y$, you need to show that you can pick one that works for a.e. $y$; it is not obvious to me how to do it (we have more than countably many $y$'s), and I think this is what your proof fails to accomplish. Let me know what you think!