I am working with a code that generates a fixed number of files and keeps that number. After every new file is created, an old one has to be deleted. This is the code: