Added IsFileExist function and fixed up makefile