restructuralized checks for krb5 enviroment