fix formatting, ensure empty homedir cannot return