[STORE] Fold two hashFile implemenation into one

simple refactoring to remove code duplication