write Buffered Events To File
Writes all buffered events to the uoc.data file. This method decrypts the file, writes all events from the event buffer to the file, clears the buffer, and then encrypts the file again. If the project is not a UOC project or if the event buffer is empty, this method does nothing. In case of an IOException during file writing, this method logs the error and throws a RuntimeException.