Added debug info for the new method to help track errors.