code refactoring in DirUtils.checkOnOrm