04.02.2014, 18:20
Well the code inside the if statement will be executed only if the file handle is valid. If it's not (that might be your case), it will neither write to, nor close the file (since it never opened successfully).
Make sure that you've set the correct permissions in the scriptfiles folder (both readable and writable).
Make sure that you've set the correct permissions in the scriptfiles folder (both readable and writable).