bug fix: writeChar; tests modified and their outputs provided