improve error checking if env var is not set