Debugging write_mask()