Updated error and after function signatures to match “before” (scope first, then callback)