Error message changes and race condition fix