replace console statements with debug statements