Finishes the file generation
The identifier of the generation process
If passed, the file generation has failed and must be terminated; pass null if the file generation succeeded