Publishing Engine Programmer's Guide > The Arbortext Publishing Engine Sub-Process > Writing Arbortext PE Applications in JavaScript > Troubleshooting JavaScript Arbortext PE Applications > Saving Intermediate Files
  
Saving Intermediate Files
If your application creates any temporary files or documents as part of generating its the response that is returned to the client, you can save those files to the transaction archive using the addIntermediateFile method of the E3ApplicationConfig interface (seeThe E3ApplicationConfig Class). The intermediate files will accompany the transaction if you use addIntermediateFile. They will be placed in the transaction directory, provided the transaction is placed in the transaction archive, and you can examine them by retrieving the transaction from the archive.