added some error handling to the make file