Remove use of $_ when reading dir
Add nb of errors