As you know Blackberries have been out a long time and were one of the first devices to put the OS on a solid state device as they have no hard drive so to speak.
Here is a guide to re flashing (re - formatting as it were) the operating system so it gets back your device.INCORRECT
Before you do that to save time you might want to try an old Engineers Trick. You may need the details of the sim card for this the PUK in particular.
When the device is locked with a bin number you have got to put an INCORRECT pin in I think 5 times it will warn you at the end the device will reset.
This is a shortcut to factory restore so this might cure the problem your having and is a shot to nothing. You might as well try you haven't anything to lose, as it puts it in a state for re- flashing.