Q:

How do I keep my PSDs from getting corrupted?

It has happened with me lot of times while I am working in Photoshop and suddenly stops, when I reopen my computer I see that .PSD file is corrupted and can't open it anymore. What a waste of time. The big problem is that there is no way to repair a corrupted .PSD file.
How to prevent .PSD file from being corrupted?

A:

Use version control, old versions (like time machine, or windows previous versions) and backups. Drives are not infallible they can make a bit go wrong. Power may go down inopportunely, caches may fail to dump to disk, device might get disconnected etc.
Version control is also very handy for other purposes such as billing info, rollbacks and possibly merges between changes, IP disputes and so on.  Backup is a must, remember your making a LIVING out of these files, loosing them can be measured in money. Also backup off device and offsite if you can (household fire can wipe out your assets otherwise). Version control can help here, since they especially distributed version control is easy shuffle around. This does not mean you can dispose of a dedicated backup system.
None of these save you form the unsaved changes in the hang but at least you can revert to last good known version that saves a lot of time.
Related posts:

Version Control for Design files
Git-style Managing for Graphics/Programming Assets on Filesystem level?

