Updated write/rewrite errors.

Related to issue #11.