Improve selection of files to check