Let ($X$,$\Delta$) be projective klt pair and $f \colon X \rightarrow Z$ be contraction of ($K\_X + \Delta$) - negative extremal ray $R$.
If $X$ is $\mathbb{Q}$ -factorial and $\mathrm{dim}Z < \mathrm{dim} X $, then Z is $\mathbb{Q}$- factorial?


I have read proof of above claim in Kollar and Mori "Birational geometry of algebraic varieties" but I have some trouble.The proof is following:


Let $D$ be effective weil divisor on $Z$ and $Z\_0 \subset Z$ be smooth locus of $Z$.
$D'$ be closure of $f^{-1}(D \cap Z\_0 )$. By $\mathbb{Q}$-factoriality of X, $mD'$ is cartier for some $m \in \mathbb{Z}$.
Since $D'$ does not meet general fibre of $f$ we have $D'.R = 0$
Hence $mD'$ is pullback of some cartier divisor on $Z$ and $D$ is $\mathbb{Q}$ cartier.


My trouble is the last statement.


Why $D$ is $\mathbb{Q}$ cartier since $mD'$ is pullback of some cartier divisor on Z? 



Is $\mathbb{Q}$-factoriality preserved under contraction?
Let $D''$ be a Cartier divisor on $Z$ such that $f^\*\mathscr O\_Z(D'')\simeq \mathscr O\_X(mD')$. Then by the projection formula $\mathscr O\_Z(D'')\simeq f\_\*\mathscr O\_X(mD')$ (since $f\_\*\mathscr O\_X\simeq \mathscr O\_Z$). 


On the other hand, from the construction we see that $\mathscr O\_Z(D'')|\_{Z\_0}\simeq f\_\*\mathscr O\_X(mD')|\_{Z\_0}\simeq \mathscr O\_Z(mD)|\_{Z\_0}$. Finally, because $Z$ is normal, the complement of $Z\_0$ has at least codimension $2$ in $Z$. Both $\mathscr O\_Z(D'')$ and $\mathscr O\_Z(mD)$ are reflexive sheaves of rank $1$, and they are isomorphic on the complement of a codimension $2$ closed set, so they are isomorphic everywhere. Hence $mD\sim D''$ which is Cartier.


