adding useEnv as an option. better logging