Rewrite write_trivial