Add check for env vars that are needed

Supports #289