onAfter[Action] callback method options

This PR replaces #124 with thanks to @EECOLOR for the initial work. It adds the `onAfterError` callback as well and adds an example to the README.