added a hack for excluding directories