This is Exercise $1.4.51$ in Tao's "an introduction to Measure Theory".
Let ${(X, {\mathcal B}, \mu)}$ be a finite measure space (i.e. ${\mu(X) < \infty})$, and let ${f: X \rightarrow [0,+\infty]}$ be a bounded function. Suppose that ${\mu}$ is complete, which means that every sub-null set is a null set. Suppose that the upper integral
$\displaystyle \overline{\int}_X f\ d\mu := \inf_{g \geq f; g \hbox{ simple}} \int_X g\ d\mu$
and lower integral
$\displaystyle \underline{\int}_X f\ d\mu := \sup_{h \leq f; h \hbox{ simple}} \int_X h\ d\mu$
agree. Show that ${f}$ is measurable.
Attempt: By the property of $\sup$ and $\inf$ we can find sequences of simple functions $(g_n)$ and $(h_n)$ such that ${g_1 \geq g_2 \geq \ldots f \geq \ldots \geq h_2 \geq h_1 \geq 0}$ with $\lim_{n \rightarrow \infty} \int_X g_n\ d\mu = \int_X h_n\ d\mu.$ By Fatou's lemma we get $\int_X \lim_{n \rightarrow \infty} g_n - h_n\ d\mu = 0$. So the unsigned measurable function $\lim_{n \rightarrow \infty} g_n - h_n = 0$ $\mu$-almost everywhere. By squeezing, this implies that $\lim_{n \rightarrow \infty} g_n(x) = \lim_{n \rightarrow \infty} h_n(x) = f(x)$ for $\mu$-almost every $x$. Let $N$ be the null set where the above equality may not hold. Note that $\forall \lambda \in [0,+\infty]$, the level set $\{x \in X: f(x) > \lambda\} = \{x \in X \setminus N: f(x) > \lambda\} \cup \{x \in N: f(x) > \lambda\}$, the latter is $\mathcal{B}$-measurable by completeness of $\mu$, and the former is also $\mathcal{B}$-measurable since it's the limit of measurable sets $\{x \in X: g_n(x) > \lambda\} \setminus N$. Hence $f$ is measurable.
Question: Since the attempt doesn't use the conditions that $f$ is bounded and $\mu$ is finite, what is the issue here?