throw errors if any.