Let $X$ be a connected affine variety over an algebraically closed field $k$, and let $X \subset Y$ be a compactification, by which I mean $Y$ is a proper variety (or projective if you prefer), and $X$ is embedded as an open dense subset.

I am guessing that it is not always the case that $Y\setminus X$ is a divisor, one could imagine it being a single point with a horrible singularity. But if $Y$ is smooth or even normal, is it the case that $Y\setminus X$ is always a divisor? Does anybody know a proof of such a result?

Thanks, Dan