Use my_fread instead of fread to take in account the return value