made file writing clear