update cpgf
release contexts before env