Modern SDCARDs often use a less resilient type of Flash memory to increase storage capacity. Although several precautions are taken in the OS to extend disk service life, all Flash/Disk media will eventually become unreliable. Events like power outages can permanently damage the cards,
So proper use of the "shutdown -h now" command, Logout button, or even "Ctrl+Allt+F2" then "Ctrl+Allt+Del" to reboot a hung session is highly recommended. Try to always shutdown the OS before disconnecting power, but in the event something goes wrong/hangs you can force a low-level file system check.
1.) Open a terminal with "Ctrl+Allt+T"
2.) And force a low-level disk check on the next reboot by running:
sudo touch /forcefsck
sudo shutdown -rF now
Note: a full disk scan can be very slow, and the OS may simply show a blank screen while the low level tasks are running. It may take several minutes to repair a severely damaged file-system, and an OS file integrity check should be manually performed too if any anomalous application behaviors emerge.