store intermediate results in file