fixed ReadLine and added both Write and ReadChar