Did you try using the flush() function as I recommended? You would need to add it after each put() that you want to immediately validate, something like this:
local path;
path = open("D:/Testfile.txt","r+");
#path = open("/test.csv","r+");
put(path,item ." ". value . "\n");
flush(path);