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.