Added intermediateDir directory