added lua error reporting