Saving and rescanning functions also update envs