Update to makefile and check.h, added more robust functionality to logging system.