[API] write debug fixed