Update example/write.js

Write. On the fly recode.