Now we have this rooted/fqdn check twice... maybe extract it into a function?