Added debug output for lua script