A question on the proof of Rigidity Lemma in birational geometry I am reading the book, Birational Geometry of Algebraic Varieties, by J$\acute{\mathrm a}$nos Koll$\acute{\mathrm a}$r et al..

(Rigidity Lemma)  Let $Y$ be an irreducible variety and $f:Y\to Z$ a proper surjective morphism. Assume that every fiber of $f$ is connected and of dimension $n$. Let $g:Y\to X$ be a morphism such that $g(f^{-1}(z_0))$ is a point for some $z_0\in Z$. Then $g(f^{-1}(z))$ is a point for any $z\in Z$.
Proof. Set $W=im(f\times g)\subset Z\times X$. We obtain proper morphisms $f:Y\to W\to Z$, where $h:Y\to W$ and $p:W\to Z$. $p^{-1}(z)=h(f^{-1}(z))$ and $dim \ p^{-1}(z_0)=0$. By the upper semi-continuity of fiber dimensions, there is an open subset $z_0\in U\subset Z$ such that $dim\ p^{-1}(z)=0$ for any $z\in U$. Thus $h$ has fiber dimension $n$ over $p^{-1}(U)$, hence $h$ has fiber dimension at least $n$ everywhere. For any $w\in W$, $h^{-1}(w)\subset f^{-1}(p(w))$, $dim\ h^{-1}(w)\geqslant n$ and $dim\ f^{-1}(p(w))=n$. Therefore $h^{-1}(w)$ is a union of irreducible components of $f^{-1}(p(w))$, and so $h(f^{-1}(p(w)))=p^{-1}(p(w))$ is finite. It is a single point since $f^{-1}(p(w))$ is connected. Q.E.D.

I have no idea on the claim that $h(f^{-1}(p(w)))=p^{-1}(p(w))$ is a finite set. Maybe I  should use the density of $p^{-1}(U)$ in $W$ ?
My try:
If $p^{-1}(p(w))$ is infinite, since $p^{-1}(U)$ is dense in $W$, one has $p^{-1}(p(w))\cap p^{-1}(U)\neq\emptyset$, equivalently , $p(w)\cap U\neq\emptyset$. Hence there exists some $z\in U$ such that $p(w)=z$. Note that $dim\ p^{-1}(z)=0$ for any $z\in U$, impossible (since $w$ is arbitrary).
So could anyone give me some hints? Thanks!
 A: I will assume that you are fine with the fact that $h$ has fiber dimension at least $n$ everywhere. Then, set theoretically, we can check $h^{-1}(w) \subset f^{-1}(p(w))$ for any $w \in W$. By assumption, $f$ has fiber dimension $n$ everywhere; thus, by the inclusion, we deduce that $h$ has fiber dimension $n$ everywhere. Now, as $f$ is proper, then so is $h$. Therefore, $h^{-1}(w)$ is a proper subvariety of $f^{-1}(p(w))$ of the same dimension. It follows that it is the union of some of the irreducible components of $f^{-1}(p(w))$.
Now, notice that $f^{-1}(p(w))=h^{-1}(p^{-1}(p(w))$. Then, $p^{-1}(p(w))$ has dimension 0. Indeed, if it had bigger dimension, $f^{-1}(p(w))$ would have dimension at least $n+1$, as $h$ has fiber dimension $n$. Since $f$ is a proper morphism, $f^{-1}(p(w))$ is a proper variety over the residue field of the point $p(w)$. In particular, $f^{-1}(p(w))$ is a variety of finite type. This implies that it has finitely many irreducible components. 
Now, we know that $p^{-1}(p(w))$ is a collection of points. Since $h$ is proper and has fiber dimension $n$, for every point $w_i$ in $p^{-1}(p(w))$, the fiber $h^{-1}(w_i)$ provides a positive finite number of irreducible components of $f^{-1}(p(w))$ (they are finite since $h$ is proper, we have at least 1 since we are working in the image of the morphism, but they may be more). Thus, since  $f^{-1}(p(w))$ has finitely many irreducible components, $p^{-1}(p(w))$ needs to be finite.
From the identity $f^{-1}(p(w))=h^{-1}(p^{-1}(p(w))$, then follows the identity $h(f^{-1}(p(w)))=p^{-1}(p(w))$.
