added ability to ignore directories