Add write_hostname method
handle grep returning nothing better