No longer need to delete *.txt. write() is removed.