Added fallback for users with non-default $HOME directory