Right then it's possible it's just filesystem corruption. 2 options:
1. Assume it's just filesystem corruption and reflash ratos to current card, then start shutting down the pi properly (you can do that from the menu in the top right in mainsail)
2. Assume it's a dying sd card, get a new one and flash ratos to that and start shutting down the pi properly.