Make pre-commit more robust

- check the files in index
- show only filenames which have problems, no diff