I'm reading lecture notes on advanced complex analysis and I'm struggling with a certain claim about the definition of the index of a complex line bundle section. Let $L\to M$ be a complex line bundle over an oriented, real 2-manifold $M$.
Definition (Index). Let $\psi\in\Gamma\left.L\right|_{M\setminus S}$ be a nowhere-vanishing section of $L$ with isolated singularities $S\subseteq M$, that is, $\psi$ is defined everywhere away from a discrete subset $S\subseteq M$. The index of $\psi$ at $p\in M$ is defined as $$\operatorname{ind}_p\psi:=\int_{\partial D}d\log f,$$ where $D\subseteq M$ is a closed disk containing $p$ in its interior, but no other singularites (i.e. $D\cap(S\setminus\{p\})=\emptyset$), and $\psi=\left.f\varphi\right|_{M\setminus S}$ for some $f\in C^\infty(M,\mathbb C)$ and $\varphi\in\Gamma L$ with no zeros in $D$.
The lecture notes claim that this definition is independent of the choices of $D$ and $\varphi$, but I'm struggling to prove it.
1st attempt at a proof: Suppose, $\psi=f\varphi=g\tilde\varphi$ for $f,g\in C^\infty(M,\mathbb C)$ and $\varphi,\tilde\varphi\in\Gamma M$ with no zeros in $D,\tilde D\subseteq M$, respectively. I have to show that $$\int_{\partial D}d\log f=\int_{\partial\tilde D}d\log g.$$ Since $D$ and $\tilde D$ are both disks, there is an orientation-preserving diffeomorphism $\Phi\colon D\to\tilde D$ and we have $$ \int_{\partial\tilde D}d\log g =\int_{\Phi(\partial D)}d\log g =\int_{\partial D}\Phi^*(d\log g) =\int_{\partial D}d(\Phi^*\log g) =\int_{\partial D}d\log(g\circ \Phi). $$ And at this point I don't know how I'm supposed to show that the latter integral coincides with $\int_{\partial D}d\log f$. If I look at their difference, I get $$ \int_{\partial\tilde D}d\log g-\int_{\partial D}d\log f =\int_{\partial D}d\log(g\circ\Phi)-\int_{\partial D}d\log f =\int_{\partial D}d\log\frac{g\circ\Phi}f, $$ which is equally unhelpful.
2nd attempt at a proof: It suffices to show that the definition is 1) independent of the choice of $\varphi$ for any given $D$, and 2) independent of the choice of $D$ for any given $\varphi$, because then it follows that $$ \int_{\partial\tilde D}d\log g \overset{1)}=\int_{\partial\tilde D}d\log f \overset{2)}=\int_{\partial D}d\log f, $$ where I used the same symbols from my first attempt. If integrals over homotopic paths coincide, then 2) is easy to show. But I still struggle with 1).
Do you guys have any ideas, tips or references for me?
If $\varphi$ and $\varphi'$ are two nowhere vanishing sections over $D$, then we have $\varphi'=t \varphi$ for some smooth, nowhere vanishing function $t$ on $D$. Since $D$ is simply-connected and $t$ is nonvanishing, we may write $t = e^{\theta}$ for some smooth $\theta$. Now let $\psi = f \varphi = g \varphi' = tg \varphi$. We conclude that $f = t g = e^{\theta} g$. Therefore $d \log(f) = d \log(g) + d \theta$. The difference term $d \theta$ is exact, so its integral over the closed contour $\partial D$ vanishes.