Added tmp dir creation