Added check for custom home directory.