Add check for addhostname