Use Fprintf in commandBytes

This avoids an extra copy in WriteString