Specify ::IO for writemime.