in reply to Re^2: Error while trying to open a file
in thread Error while trying to open a file

Then either $artefact is not what you think it is (especially look for whitespace like newlines at the end of it) or you have filenames with "problematic" characters that don't fit within Latin-1.

Also see