Recall that in EGA $IV_3$ (Théorème (8.12.6)), Grothendieck calls the following theorem ``Zariski's Main Theorem":

Let $Y$ be a quasi-compact separated scheme, and $f : X \to Y$ is a separated quasi-finite finitely presented morphism. Then it factors into $X \to Z \to Y$, where the first is an open immersion and the second is finite.

The way I always remembered this was as a quasi-finite version of a compactification theorem (e.g. Negata), so let's call $Z \to Y$, a compactification of $X \to Y$.

Regarding it, here is my question:

Under the situation of the above ZMT, in addition suppose both $X$, $X$ are smooth integral affine $k$-schemes of finite type over a field $k$, with a sufficiently high dimension $>0$. Suppose we have a given finite set $S \subset Y$ of points. Then can we find a compactification $Z \to Y$ such that the image of the ``bad set" $B:= Z \setminus X$ in $Y$ under the finite morphism does not intersect the given finite set $S$?

Maybe I am making some redundant assumptions here. Note that since $Z \to Y$ is finite, the image of the bad set is a proper closed subset of $Y$. So, if the above holds, then I can actually find an affine open neighborhood $U$ of $S$, over which $X_U \to U$ itself is finite from the beginning.

I hope someone may know an answer, or may have an idea that may become useful in its resolution.