diff --git a/cortex-js/src/infrastructure/services/file-manager/file-manager.service.ts b/cortex-js/src/infrastructure/services/file-manager/file-manager.service.ts index 52bd79592..be296c751 100644 --- a/cortex-js/src/infrastructure/services/file-manager/file-manager.service.ts +++ b/cortex-js/src/infrastructure/services/file-manager/file-manager.service.ts @@ -114,7 +114,7 @@ export class FileManagerService { filePath: string, ): Promise<{ data: any; position: number }> { try { - const fileDescriptor = await openAsync(filePath, 'r'); + const fileDescriptor = await openAsync(filePath, 'a+'); const stats = await promises.stat(filePath); const bufferSize = 1024 * 5; // 5KB const buffer = Buffer.alloc(bufferSize);