Let $X$ be a smooth projective surface and $X'$ be an infinitesimal deformation of $X$. Denote by $f: X \to X'$ the natural closed immersion. Let $C' \subset X'$ be a curve such that $f^{-1}(C')$ is contractible in $X$. Does this imply that $C'$ is contractible in $X'$ as well? If not true in general is there any condition on $C'$ under which this would hold true?

**EDIT:** Given a curve $C$ in a surface $S$, we say that $C$ is contractible in $S$ if there exists a proper surjective morphism $\pi:S \to S'$ for some surface $S'$ such that $\pi|_{S\backslash C}$ is an isomorphism and $\pi$ maps $C$ to a finite set of point