Writes cleanup, and Write[Failure, JsObject]