sometimes mkdirp doesn't finish in time.