add certificate check to setup