write environment