tksl refactoring: raise exception if tksl fails + fixed syntax