Lazily check OS environment in Fred Gateway