EZP-21825: Unlink temporary files inside the loop, if needed