Setup: $\pi: \mathcal X \to C$ is a flat morphism from a germ of a smooth curve $(C, o)$. Suppose the special fiber $\pi^{-1}(o) := \mathcal X\_o$ has a certain class of singularities, one wants to study if $\mathcal X$ preserves such singularities.


It has been shown (see "[Deformations of canonical singularities](https://doi.org/10.1090/S0894-0347-99-00285-4)") that the above property holds for canonical singularities; but it fails for klt singularities (see "[On the extension problem of pluricanonical forms](https://arxiv.org/abs/math/9809091v1)," Example 4.3). 


However, I found an one-line argument for both cases, could anyone point out where I was wrong?


Here is the argument: First, it is known that $\mathcal X$ is $\mathbb Q$-Gorenstein. Because $\{o\}$ is a divisor on $C$, $\mathcal X\_o$ can also be viewed as the pull-back Cartier divisor $\pi^\*{o}$, hence it is Cartier, and by adjunction (assuming $\mathcal X$ is CM)
$$(K\_{\mathcal X}+\mathcal X\_o)|{\_{\mathcal X\_o}} = K\_{\mathcal X\_o}.$$ Then by the precise inversion of adjunction,
$${\rm total~discrepancy}\{\mathcal X\_o\} = {\rm total~discrepancy}\{(\mathcal X, \mathcal X\_o){\rm~with~center~intersects~} \mathcal X\_o\}.$$ Hence the minimal discrepancy of $(\mathcal X, \mathcal X\_o)$ near $\mathcal X\_o$ is $\geq 0$ in the canonical case and $>-1$ in the klt case. In particular, $\mathcal X$ is canonical and klt respectively.



A paradox on the deformation of singularities
I don't think it is true that $\mathcal X$ is $\mathbb Q$-Gorenstein. Suppose in fact that $\dim \mathcal X \_t=2$ for all $t\in C$ and $\mathcal X \to Z$ is a flipping contraction with exceptional locus contained in the central fiber $\mathcal X \_0$, then $K\_Z$ is not $\mathbb Q$-Cartier, but if $\mathcal X \_0$ is a klt surface, then ${Z\_0}$ is also a klt surface and hence $\mathbb Q$-Gorenstein (and even $\mathbb Q$-factorial). See Example 4.3 of <https://arxiv.org/pdf/math/9809091.pdf> for details and see <https://arxiv.org/pdf/0901.0389.pdf> for many related results.


