Fixing indents and stop assuming env var expansion will work - it won't