(refactor) Replace loggin utility with debug