finish before error return