Allow CFLAGS override
Fixed Chip ID reading when bytes_count != 3
malloc() success checks
Fixed reading segfault

free(buf) was getting called in a front of fwrite()