Add documentation on onTerminate to clarify usage scenarios
Closes #106