added env check to db config