Read lines works (writing not so much)
Working writes, and illustrative comment
Note but do not fix parsing bug