Implemented writeChar and writeString functions