adding env variable check