Change to use write rather than writeraw which is going away.