To be really torrought you should check if the header is the write size, before reading, if you some junk in file reader, you'll get a generic error on the read function, instead of the pretty check you do in FileHeader.