Change debug writes to trace writes