Added in directory checking