file writter with its tests

Write and removing file
咦。竟然只有一个t。。。等我改下