Write to .env file and output SetEnv for production