improve error message
fix bug when several files are searched