fix file hash function