I have some questions about the proof of the residue theorem in Lectures on Riemann Surfaces by Otto Forster.
The Residue Theorem. Suppose $X$ is a compact Riemann surface and $a_1,\cdots,a_n$ are distinct points in $X$. Let $X':= X \setminus \{a_1, \cdots,a_n\}$. Then for every holomorphic 1-form $\omega \in \Omega(X')$, one has $$ \sum_{k=1}^n {\rm Res}_{a_k}(\omega) = 0. $$
In the proof, $(U_k, z_k)$ are coordinate neighbourhoods of $a_k$. For every $k$, $f_k$ is a function with compact support ${\rm Supp}(f_k) \subset U_k$ such that there exists an open neighbourhood $U'_k \subset U_k$ of $a_k$ with $f_k|U'_k = 1$. Set $g:=1-(f_1+\cdots+f_n)$. Then, $$ \int\int_X d(g\omega) =0. $$
I have difficulty following the argument from the next sentence.
Now $d(g\omega) = - \sum d(f_k \omega)$ implies $$ \sum_{k=1}^n \int\int_X d(f_k \omega) = 0. $$
Does this mean $d\omega =0$ on $X$? I know $d\omega=0$ on $X'$ since $\omega$ is holomorphic on $X'$. But, $\omega$ is not defined at $a_k$.
I have one more question probably related to this one.
Using the coordinates $z_k$ we may identify $U_k$ with the unit disk. There exists $0 < \epsilon < R <1$ such that $$ {\rm Supp(f_k)} \subset \{ |z_k| < R \} \; \text{and} \; f_k | \{|z_k| \leq \epsilon\}=1. $$ But then $$ \int\int_X d(f_k\omega) = \int\int_{\epsilon \leq |z_k| \leq R} d(f_k\omega) = \int_{|z_k|=R} f_k \omega - \int_{|z_k|=\epsilon} f_k \omega $$
Does the first equality mean that $d\omega=0$ in $\{|z_k| < \epsilon\}$ ? I cannot understand this by the same reason as my first answer.
I would be really grateful, if someone could help me understand this proof.