TITLE: A paradox on the deformation of singularities
QUESTION [6 upvotes]: 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.

REPLY [4 votes]: 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.
The paper F-Regularity Does Not Deform by A. K. Singh (1999) [arxiv] shows that F-regularity doesn't satisfy this property (F-regularity is the analog of KLT singularities).  The singularities there are given by rather explicit equations.