Fixed indentation
Added 'onAfterError' callback in line with others
Added line for onAfterError option and example usage of onAfterComplete