Ensure addFilesPromise won't produce null pointers if the worker is terminated before it is finished.