Move update debug closer to actual write.