exit with error code if error occurs while install