docu-notion
                                
                                 docu-notion copied to clipboard
                                
                                    docu-notion copied to clipboard
                            
                            
                            
                        Image not written to disk
We have been trying docunotion and ran into an issue where an image that was being downloaded was not making it to the disk correctly.
I tracked it down to this line: https://github.com/sillsdev/docu-notion/blob/f1176c574cce15244b65dd77c43de2e791fe361c/src/images.ts#L204
Changing it to fs.writeFileSync(path, buffer) fixes the issue.
It's unclear why the code does not await for the file to be written, is there any reason for that?