Not exactly sure how to do it, it would take some time to figure out the details, but here is a idea...
When you OS boots up it should automaticly run a test on the filesystem to determine if it was shutdown properly, if it detects a anomily it will run thru the fix it program. (fsck.whatever) You could use the information returned by fsck to run a quick bash script to make a copy of the message
Here is a clue, a snippet from man fsck:
The exit code returned by fsck is the sum of the following conditions:
0 - No errors
1 - File system errors corrected
2 - System should be rebooted
4 - File system errors left uncorrected
8 - Operational error
16 - Usage or syntax error
32 - Fsck canceled by user request
128 - Shared library error
The exit code returned when multiple file systems are checked is the
bit-wise OR of the exit codes for each file system that is checked.
So once you make the script add it to your fsck startup script and that should do it. Put a simple echo command in it to make sure the changes work.
Of course there are 400,000 different ways to do this, but this is just a suggestion. It may only do these codes on ext2/3 file systems, others may be different too.