Avoid finding words longer than the buffer size.
Avoid crashing on empty files.
Avoid crashing on non-existent files.