The context of this question is my attempt to generalise the Hurwitz theorem to varieties that aren't necessarily curves. In the case of curves, we have that a closed point always maps to a closed point because we are generally only dealing with finite morphisms. So we get a morphism from a prime divisor to a prime divisor, which we can extend linearly with ramification indices.
But as soon as we leave the world of curves this seems more difficult. The situation I am in is if we have a normal variety $Y$ with a projective birational morphism from a smooth variety $\pi: X \rightarrow Y$. Now if $p \in X$ is the generic point of a codimension $1$ subset, then why should it be true that $f(p)$ also has codimension $1$?
My attempt so far is to notice that since the morphism is dominant we have an injective morphism on local rings $\mathcal{O}_{Y, f(p)} \rightarrow \mathcal{O}_{X, p}$ from which we get that $\dim \mathcal{O}_{Y, f(p)} \leq \dim \mathcal{O}_{X, p}$. But to obtain equality we would normally want the extension of local rings to be integral. Is there any way to deduce integrality from the fact that the morphism $\pi$ is proper? If it were affine I think we could, because we would have a univerally closed morphism of affine schemes. But in this case it doesn't seem so obvious. Is it even true?