I'd like to get my hands on your work if possible. I'm no coder, so I can't really help in that respect.
Also, when I fsck my drive, I always boot into single user mode in which my drive is mounted read only (or something like that). I thought this would affect fsck if my computer was not booted into single user mode.