Detect and skip files that pcre can't process.
Slightly more standardized logging in this function. Mention that strerror isn't thread-safe.