Modified variable name from domain to domainDirectory.