OK, I finally was able to download and test the latest version of your program. I run on the E64 board and do see the "Write failure" messages, occurring in random frequency at each run. What's interesting that it always appear at the 1st iteration of the 500-iteration loop. I wonder what's so special about this 1st iteration. The only explanation I can think of is that some caching and buffering takes place in the process, and somehow the situation is "cleared" when further transactions are generated to the places previously visited.
I also do not think this is a "write error". I actually suspect it is "read errors". Write errors would destroy the program's image, and it looks like programs run perfectly.
Certainly, there's some more diagnostics work required here. I will have to look for ways to programmatically make sure that no caching or buffering is done on the way from the host to the device and back.