Sum of absolutely continuous functions is absolutely continuous

Let $g_k, k=1,2,...$ be a sequence of absolutely continuous functions. Suppose $\displaystyle f(x):=\sum_{k=1}^\infty g_k(x)$ is convergent for all $x \in [a,b]$ and $$\sum_{k=1}^\infty \int_a^b |g'_k(x)|\, dx < \infty$$ Show that $f$ is absolutely continuous on $[a,b]$ and $$f'(x)=\sum_{k=1}^\infty g'_k(x)$$ for almost every $x \in [a,b]$.

My thought is as follows:

(1) By monotone convergence theorem, $$\int_a^b \sum_{k=1}^\infty |g'_k(x)|\, dx = \sum_{k=1}^\infty \int_a^b |g'_k(x)|\, dx <\infty$$ so $\displaystyle \sum_{k=1}^\infty |g'_k(x)|$ is an integrable function.

(2) Consider the series $h_n(x) = \sum_{k=1}^n g'_k(x)$. Since $|h_n(x)|\leq \sum_{k=1}^n |g'_k(x)| \leq \sum_{k=1}^\infty |g'_k(x)|$ for all $x$, by dominated convergence theorem, for all $x \in [a,b]$, we have $$\int_a^x \sum_{k=1}^\infty g'_k(t)\, dt = \lim_{n \to \infty} \int_a^x h_n(t)\, dt = \sum_{k=1}^\infty \int_a^x g'_k(t)\, dt = \sum_{k=1}^\infty g_k(x)-g_k(a) = f(x)-f(a).$$

(3) Therefore, $f(x)$ is an indefinite integral (of an integrable function, whose integrability was established in (1)), so $f(x)$ is absolutely continuous.

(4) By the formula in (2), we see that $\displaystyle f'(x) = \sum_{k=1}^\infty g'_k(x)$ for almost every $x \in [a,b]$.

Since I just started teaching myself real analysis, I was hoping that someone could help me check if the proof is valid. Thank you!