fixed creating outdir bug