As online said use the new fopen fwrite fclose as this saves on the huge levels of disk read and writing a /write does, see the problem isnt mirc moves the original file, but rasther its making a copy of the original with the changes in it, then (i assume) it deletes the original and renames/moves the copy to the location of the original, would appear that you maybe getting some type of error in mirc between two internal steps of the /write command, the build a new file & the rename/move parts.

Im wondering if u have another application accessing the file also and it maybe a problem with file access rights etc.