write a tmp.txt