If the output is small, less than 500 rows, I simply add them to the existing file. If the output is larger, I create a new file. The issue arises when the new file has multiple sheets with 500k rows per sheet.