A paradox on the deformation of singularities

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") that the above property holds for canonical singularities; but it fails for klt singularities (see "On the extension problem of pluricanonical forms," 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.

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.
• Thank you! This is a point I ignored for the klt case. But for canonical case, $\mathcal X$ is indeed $\mathbb Q$-Goresstein as mentioned in the paper "Deformations of canonical singularities" $\S 2$. In this case, is my argument correct? Isn't that too simple to be true (of course, at the time of above paper, precise inversion of adjunction has not been proven yet)? Aug 9 '18 at 8:58
Just to add to Hacon's answer. This kind of thing has also been studied quite a bit in the characteristic $p > 0$ side. In fact, it was observed in F-purity and rational singularity by R. Fedder (1983) that $F$-pure singularities don't have this property. $F$-pure was later seen to be the analog of log canonical singularities.