Introduce tmp directory for storing intermediate files