adding vault check before autogenerating a key