Moving functionality out of the head_fsck.rb file