Add examples for finish and before_exit.