This seems to be way to much trouble so i have decided to go a differant direction on the script.
I just made a script that will fwrite an include every time i hit "on"
and an "off" button that will erase only the content of the file.
Its a total of 5 files but i works.
THANK YOU phorce, diafol and Javvy for your PATIENCE and HELP.