load env only if needed