write debug lib