That Felix FileInstall feature has been reported to cause problems.
Try to follow this:
If you have a felix.fileinstall.filename parameter in the .config file, remove it, restart openHAB and paste your panel registry backup in the text area in Paper UI one last time, the truncating should not happen again afterwards.