Don't forget `conn.Write` may return error.
We should check `err` after each `conn.Write`.