added capture extension debug output callback class and helper function