fix line reading and writing