Use 1 global lock for operations. Wrap every operation with try catch to ensure that error won't lock plugin forever