Fix modules are not loaded. It will stop the script

- Fix modules are not loaded.
- Fix metadata service not reachable from instance.