You may need to give the npc-server read rights to the file.
Anyway, here is a function which uses loadlines to check if a file exists.
PHP Code:
function fileexists2(file) {
temp.file.loadlines(file);
if (temp.file.length() > 0) {
return true;
}
return false;
}