switch between checking all files and finding files