Let $f: X \to Y$ be a surjective morphism of normal projective varieties with connected fibers (in my case, $X$ is $\mathbb{Q}$- factorial also). Let $E$ be an irreducible $f$-exceptional divisor (i.e. the codim of its image is at least $2$) and $W:= f(E)$. Suppose the irreducible components of $f^{-1}W$ are $E$ and $S$, where codim $S \geq 2$. Suppose, I remove $S$ from $X$ and then put back to $X \setminus S$ all the points of $E \cap S$ which were removed in the process. Let $X^{'}$ be the resulting variety and $f^{'}: X^{'} \to Y$ the restricted morphism.
Is $f^{'}$ still projective?
Apologies if this is elementary, but I could not find any useful reference for this. Thanks in advance!