fix output handler up to the stage where it runs the analysis and create results in working directory