make wrappers regeneration actually fail when something goes wrong, improve logging