Fixed CMakeLists.txt bug for Ubunut 13.10 and Add handle fread error
code for fixed gcc -Wunused-result error