write envrironment to file
Merge pull request #14 from cjoelrun/write_environment

write envrironment to file