Use Local-Storage as a temporary storage.
This utils help to keep track of temporary files while running. It REMOVES all temporary ON ANY RESTART of the class.
Install the npm package : npm install --save moontils-local-storage
Import it into your code :
import LocalStorage from 'moontils-local-storage'
const storage = new LocalStorage('/tmp/test-storage');
const file = storage.create();
file.write.write('Test!\n');