bug fix (Add Debug Write)