f.buf.write -> f.write