Let $1_{[0,1]}$ be the characteristic function of $[0,1]$. Show that there is no everywhere continuous function $f$ on $\mathbb{R}$ such that $$f(x)=1_{[0,1]}(x)\,\,\,\,\,\,\,\,\,\,\,\,\,\text{almost everywhere.}$$
My attempt:
Suppose for a contradiction that such a function does exists, and call it $f$. Then $f$ differs from $1_{[0,1]}$ only on a set of measure zero, which we denote by $M$. In a previous post I showed that a set of Lebesgue measure zero in $\mathbb{R}$ is totally disconnected. Let $x\in M$, and suppose without loss of generality that $1_{[0,1]}(x)=0,$ and hence that $f(x)\ne 0.$
Then, total disconnectedness implies that there is a sequence $\{x_n\}^{\infty}_{n=1}\notin M$, such that $x_n\rightarrow x$, and $1_{[0,1]}(x_n)=0$. However, $\lim_{n\rightarrow \infty}f(x_n)\ne f(x)$, since by hypothesis $f(x)\ne 1_{[0,1]}(x)$ but $f(x_n)=1_{[0,1]}(x_n)$ for all $n\geq1.$ This contradicts the continuity of $f$, and therefore such a function does not exist.
Is the above argument sound? Any comments are welcomed, be it about the correctness of the proof or whether the style is not the best.
Thank you for your time and feedback