* fix deadlock
  * maybe dirEmpty?
