Compute hash on chunks on some conditions