Added tmp folder creation if it does not exist