added exit for missing env vars