Separators differ
The separator between folders is a platform detail. Join builds it for you, which is why hand-glued paths break when code travels.
Testing is not opening
A file can pass a check and still fail to open, because something changed in between. Handle the failure at the open.