The filename of the $idfile is determined by the program, and references to a file almost local to the script (one directory below). Anyway, it is relative local path.
The file opens for reading without problems. The halt occurs on trying to open the file for writing. Using absolute paths does not make any effect.