debug(bklog):Add debug msgs to write function