Libreoffice 4 config in LO 5?

Hello,
I have the known issue with the message about loading the BASIC of the document.

However, I don’t understand why this is happening. The message is:

Error loading BASIC of document file:///home/username/.config/libreoffice/4/user/basic/Standard/script.xlb/:
General Error.
General input/output error. 

Clearly, we talk about LO 4. But my LO is 5.
So, the questions:

  1. As far as I understand it, the directory /home/username/.config/libreoffice/4 is the user’s profile. Why is it 4??
  2. I solved the problem of the BASIC message by removing the missing files. But I cannot understand how they where written in the first place! Is there any way to find which app did this?

Regarding your #1, LO 5 and 6 did not bump the version number of the config directory, presumably due to the faster release schedule in recent years, and the fact that X.0 versions are not more important than point releases. As for #2, perhaps someone familiar with LO BASIC can answer.