Added better error handling to installer script