Added some logging.
Fixed error with looping checker.
More bugfixes in Lua.