* fixed printf warns LLX now using PRIX64 macro from inttypes.

* added checks to fread and fgets.
This fixes the linux build, now compiles like a charm ;)