connectedness can be checked on special fibre Let $X$ be a scheme over $\mathrm{Spec}(R)$, $R$ a DVR with residue field $k = R/\mathfrak{m}$. I read an argument that said that if the special fibre $X_k$ is connected then $X$ is connected. Is this true without any assumptions on $X$? In the case I care about $X \to \mathrm{Spec}(R)$ is affine (in fact finite) flat. Is the argument correct when we include one or both of these assumptions, and why?
Edit: As Mohan has pointed out in the comments, this cannot be true in the general case where $X$ is affine and flat. I'm curious whether it's true when $X$ is also finite. For example, I'm told $X = \mathrm{Spec}(\mathbb{Z}_p[x]/(x^p-1))$ is connected but I don't see why. It's special fibre is clearly connected.
 A: I think we have the following (apply it to the case $S = \operatorname{Spec} R$ where $R$ is a local ring and $X$ is a proper $S$-scheme):
Claim: Let $S$ be a topological space containing a point $s \in S$ which is contained in all nonempty closed subsets of $S$. Let $X$ be a topological space admitting a closed continuous map $f : X \to S$. If $f^{-1}(s)$ is connected, then $X$ is connected.
Proof: For any $x \in X$, the closure of $x$ in $X$ contains a point of $f^{-1}(s)$ (i.e. $\overline{\{x\}} \cap f^{-1}(s) \ne \emptyset$) since $f(\overline{\{x\}})$ is a nonempty closed subset of $S$ (hence contains $s$). Let $U_{1},U_{2}$ be two disjoint open subsets of $X$ such that $X = U_{1} \cup U_{2}$. Since $f^{-1}(s)$ is connected, then $f^{-1}(s)$ is contained in (exactly) one of $U_{1},U_{2}$; say $f^{-1}(s) \subseteq U_{1}$; if $U_{2}$ is nonempty, say $x \in U_{2}$, then $\overline{\{x\}} \subseteq U_{2}$ since $U_{2} = X \setminus U_{1}$ is closed, but this contradicts $\overline{\{x\}} \cap f^{-1}(s) \ne \emptyset$.

Remark: The ring $A = \mathbb{Z}_{p}[x]/(x^{p}-1)$ is in fact local: since $A$ is finite over $\mathbb{Z}_{p}$, all maximal ideals lie over $p\mathbb{Z}_{p}$, so the maximal ideals of $A$ correspond to prime ideals of $A \otimes_{\mathbb{Z}_{p}} \mathbb{F}_{p} \simeq \mathbb{F}_{p}[x]/((x-1)^{p})$, which has a unique prime.
