Error loading BASIC of document

I’m getting this error message every time I try to start LO:

Error loading BASIC of document file///C:/Program%20Files/LibreOffice%205/program/…/share/Template/script.xlb
General Error.
General input/output error.

I renamed the user profile and did a repair install with no results. At that point, the program would not start at all. It just hung. Clicking to close the error message just caused it to pop up again. I had to end the process through task manager.

After searching around, I finally found the safe mode option. (For folks that use the quick starter, you have to click the windows button>all programs>LibreOffice 5.3. It’s an option there.) From there, I did Restore from Backup and checked both boxes. After that, the error message would still come up, but I can close it and the program will run.

I went back into safe mode and clicked the Reset to Factory Settings radio button and checked both boxes. (I’m guessing that this is the most extreme option offered without getting into the technical issues.) That made no difference. I still get the error message, but can close it and the program seems to work. (I am writing this before I try to use LO so that I don’t forget what I did.)

This began when I was working on a Writer document. I tried to do a spelling/grammar (S/G) check and the program crashed. When I started the program again, I got the error message. So, is there a bug in the S/G check?

I just did a S/G check, and it seems to be working fine. I’m posting b/c I still get the error message and am concerned that there is still a problem.

Thank you

It looks as though there is corruption on some files.

Post the full path to the script.xlb and the file contents.

Sorry, I did not see the notice of your reply.

Here is what I found:
C:\Program Files (x86)\LibreOffice 5\share\basic\Template
Contents:

<?xml version="1.0" encoding="UTF-8"?>

<library:library xmlns:library=“http://openoffice.org/2000/library” library:name=“Template” library:readonly=“true” library:passwordprotected=“false”>
<library:element library:name=“ModuleAgenda”/>
<library:element library:name=“Correspondence”/>
<library:element library:name=“Samples”/>
<library:element library:name=“Autotext”/>
</library:library>