Adjust control of file name and max cycle