Updated emits to be consistent (err, result)