Improved error handlers
Prototype rif40_captrure.output
Further work to capture output