Added on-begin callback

I was thinking in something like this for #5.
I tried using "onStart" instead of "onBegin" but it never fired (no idea why).