wg.Done() on error