removing subdirectories from search when looking for created files to output