Added the ability to filter out directories