handle `path_normalize` and `str_copy` failures