Let $X,X_1,X_2,\dots$ be real valued random variables. If $f:\mathbb{R} \to \mathbb{R}$ is continuous on $\mathbb{R}\setminus D_f$ with $\mathbb{P}(X \in D_f)=0$. Then $X_n \to X$ a.s. implies $f(X_n) \to f(X)$ a.s.
my Question: Why is f automatically mesurable?
Since $f$ is continous then $f^{-1} ((-\infty , a)) $ is an open subset of $\mathbb{R}\setminus D_f$ hence $$f^{-1} ((-\infty , a))=(\mathbb{R}\setminus D_f )\cap G$$ where $G$ is an open subset of $\mathbb{R}.$ Now $D_f$ has measure zero so it is measurable hence $\mathbb{R}\setminus D_f $ is measurable ans since $G$ is open it is measurable so the set $$f^{-1} ((-\infty , a))=(\mathbb{R}\setminus D_f )\cap G$$ is measurable and this implies that $f$ is measueable.