LocalFileSystem corrupted

I am developing my project with mbed NXP LPC1768.

Sometimes the mbed flash memory will be empty, except the MBED.HTM file. But the used space stays the same as before. So which means the files are not deleted, but PC and my firmware just cannot see them.

Does anyboday know what can be the root cause of this issue, and what would be a good solution?