return err in cb