updates for passing environment to pre-generated scripts