updated code to use npm OS - if process.env.hostname is not set, we get the hostname from OS.hostname()