added correct detection of lua lib
added some log messages to detect random crash on android