Wrong output directory assignment fixed