You should only call write(...) here.