cleanup makefile and .gitignore
print error message on error