* fixed warns llX using PRIX64 macro from inttypes.
* added checks to fread and fgets.