improve comments for lua scripts
introduce TryLock