on_abort handler

Fixes #67