added better error handling to intsall generator