moved check to be env_var specified rather than compile-time