Fixes the problem that the application crashes when the home directory does not exist.