fixed debug writer