Added error logging to everything.
Added lua.