function use
write txt file