Added extra home directory resolution checks