I am storing a filename is a config file . The file will only hold one line which is the last used filename . So that we can easily calculate the next file .
And we are calculating the next file at each map change . So it's like
1) Retriving the old file name from the config file
2) take the next file
3)delete the old entry from the config file
4) put the new entry