Hello @ShinagdeS,
CSV Writer does not have this possibility. You can either put writer node within Try/Catch loop within generic loop (see here) and wait while you or someone else closes file either use scripting nodes (for example Java Snippet node) to force closing. Latter option might not be good as someone might lose his work if you force closing.
But who or rather which process also opens file you are writing to? And where is the location of this file?
Br,
Ivan