Fine-grained control of saving interim files across epochs