Passing the hostname as a parameter instead of manipulating global config