added support for excluding dirs