write proto