added void cast to fread() calls to remove GCC warning