[patch] add debug statements