fix undeclared array, fix filepath to local example file, fix fscanf-call, fix retcode-checking, fix debug output
update makefile for automatic compiling