[sgen] Flush after writing the protocol entry