Throw error if required env variables are absent.