Quote:
file is used by another process.
And guess which application it is which uses that log file?
Well, of course, it's yours.
Use adifferent design: there must be only one class which writes to the log file, and call a public method of that class for adding an entry to the log file.