Resolve crash on /dev/null as home dir

* Bug resolved with /dev/null as home directory