update example with err param
1.0.1