Yeah, thanks guys. From what I can tell, the new code works great.

P.S. Yeah, I agree it's something going on with the internals of /write.