revert last change and add some debug printfs to better understand this plugin