add ENV wrapper and spec test for missing variables