refs #1669 : modified - writeCode understands protocol