fixed: directory checking