added error checking for exthash