Contraction of curves on a surface and stalks

Let $$f:X \rightarrow S$$ be a fibered surface over a Dedekind scheme of dimension $1.$ Let $$s_1, \ldots, s_n$$ be closed points of S and $\{E_{ij}\}$ irreducible vertical divisors of $X$ with $E_{ij} \subset X_{s_i}$.

I want to show that the contraction of the $E_{ij}$ exists if for $i \leq n$, the contraction of the $E_{ij}$ exists in the fibered surface $$X \times_S \text{Spec } \mathcal{O}_{S,s_i} \rightarrow \text{Spec } \mathcal{O}_{S,s_i}.$$

Here are some short thoughts on way one could show this:

One way of showing that contraction morphisms of a set of integral vertical curves $\mathcal{E}$ exists on an arithmetic surface $X$ is to find an effective Cartier divisor $D$ on $X$ such that $\mathcal{O}_X(D)$ is globally generated, $\mathcal{O}_X|_{X_\eta}$ is ample and for any integral vertical curve $E$ not contained in $\mathcal{E}$, the sheaf $\mathcal{O}_X(D)|_E$ is ample.

I have thought of trying to apply the above to find Cartier divisors $D_i$ on $$X \times_S \text{Spec } \mathcal{O}_{S,s_i}$$ wuith the above properties, and try to extend them all to $X$ and them combine them in some way to get a globally defined Cartier divisor $D$ with the required properties.

I believe I can extend the Cartier divisors $D_i$ to all of $X$, and add them together so I actually get a contraction, but my method of doing so is very ugly and could easily contain mistakes.

Could anyone give me a proof, or hint of how to do this cleanly? If you don't see any clean proof, can you see why we can extend the Cartier divisors to all of $X$ so that they add to a Cartier divisor with the satisfied properties?

Thankful for help.

• If $X$ is not regular, I don't see why D_i would extend. But you can glue in a suitable way the contractions above the various points $s_i$ to get the contraction over $S$. – Cantlog Jan 22 '15 at 16:16
• @Cantlog Maybe the $D_i$ don't extend! If so, could you give the answer you have given, but with a bit more detail about how to glue the morphisms? – user101036 Jan 22 '15 at 19:22