add ability to write environment properties

I believe this one should be placed in ``utils.py``