I write a code to real-time scan txt file and find error, but another program need to rename the file when file is full. My code stop another program from changing the name,