in reply to Re^2: Can't Write to Files properly
in thread Can't Write to Files properly
The reason it doesn't run under strictures is because it's broken, which you know or you wouldn't have come here with a problem. If you don't understand what the error messages mean ask about those, but leave strictures on.
Oh, and if you really want people to take interest in your problem, whittle the code down to a self contained sample that runs and demonstrates the issue, although that will take you some time and if you are unfortunate you may figure the solution out for yourself in the process.
True laziness is hard work