Allow hostname as an optional argument