removed tabs, moved output dir creation