[DEV][add] Thread-safe access to stack
[DEV][add] Change internal logic on 'failures'