Fixed to work with homedir properly