When you wrote the channel name to the text file, did you use something like
Code:
/write enabled.txt $chan more text here

or
Code:
/write enabled.txt $chan


If the first, then I don't see why it's not working.
If the second, then change the s switch in the $read to a w