Made WriteChars and WriteBytes more useful (bufSize and length to write can be specified separately)