Don't use deprecated Writer.write_str().

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
Update for recent language changes.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>