[API] write debug output added