good makefile, edited writeToCache, now getting segfault though