fixing typo in snapshot.sh
Moving Env functions into separate file