add error callbacks to GenerateHash and reflect changes