Adding possibility to override hostname.