Why do you use `mb_strlen()` ? `path_identification_string` is not supposed to contain unicode characters.