Use write_if_different helper in namespace roc.
Closes #237