improve dirmaker concurrency logic