Fix to use output path