handle nil home directory error