add some debug logging
remove the use of Capture::Tiny