locate: better control over file switching
Resulting in more coherent error messages in case of errors, and less "false
positive".