fix this.hostsPath is undefined