file writter with its tests

Write and removing file
typo?