Fixed generation of hash for a file