Fix recording of timeout in error case.