(Aside) declaring this `const size_t num_files = ...` would be a minor improvement.
Indeed, `const char *const file_stems[]` would also make sense.