cleanup temp mem map writer