updated domain handling to reflect nodejs.org/api/domain.html docs