Nicer lua error output, added support for field grouping