moves home dir func body into method that uses it in store.go