Added logging functionality and makefile now properly works