Dev

Deferred the error handling to outside the haskell code, no more crashing in any lua5.1, 5.2 or luajit.