Added environment dump and restore ability