add hostname and domain andm to writer