Incresed resilience to crashes, and error reporting with on_error function
Merge pull request #6 from psytale/less_crashes

Incresed resilience to crashes, and error reporting with on_error function