Error handling for benchmark