Fixed invocation of writeSingle to not add a line break at the end of the line.