add err to callbacks