Let $\pi:\mathcal{X} \to S$ be a family of smooth surfaces containing a subfamily $\mathcal{Y} \subset \mathcal{X}$ proper, flat over $S$ parametrizing contractible curves in $\mathcal{X}$ satisfying the property: for every $s \in S$, $\mathcal{Y}_s \subset \mathcal{X}_s$ is a contractible local complete intersection curve in $\mathcal{X}_s$ which is an union of smooth rational curves. Is there a criterion on the configuration of the rational curves such that there exist a family of surfaces $\mathcal{Z} \to S$ along with a proper $S-$morphism $\phi:\mathcal{X} \to \mathcal{Z}$ such that for all $s \in S$, $\phi(\mathcal{Y}_s)$ is a point, $y_s \in \mathcal{Z}_s$? and $\mathcal{X}$ is the blow up of $\mathcal{Z}$ along $\phi(\mathcal{Y})$
EDIT:Furthermore, if $\mathcal{Y}$ is contractible as a scheme in the sense there exists a proper $S-$morphism from $\mathcal{Y}$ to $S$ then does there exist such a $\mathcal{Z}$ as above?