Pull hashBytes out of the try block