To implement the check is easy - the question is why is it failing in the first place?
updatecheck is called during installation here:
updatecheck
However, setupVars.conf is written earlier:
setupVars.conf