Close file after computing the hash