fixes add log in getdomain function