Your filename in the second version include a unicode Narrow No-Break Space (U+202F) that is not the same as the normal space you generated in your first code. So the filename with a normal space doesn't exist in your filesystem.