added makefile, better handling of reading trace