fixed domain name call

fixed domain name call
added exception check
code comments

code comments
Merge pull request #41 from MSOpenTech/domain-joined

Domain joined