setup local env var storage and checks for environment mode