Mockups: move the new write code to proper mockup