preprocess tmp folder