implement file hashing logic