Added detection of bad links in loaded files, added more functions to Lua binding