Race condition with dirs