Refs #20847 - Avoid multiple 2 or more async jobs generating the same file

- If 2 users click on download at the same time, the second async job will
  return the file generated by the first async job.
- Fixed raised error
- Cleanup temporary files on errors.