throwing an exception if neccessary environment vars arent set