keep output_dir setting and fix integration