stop using threading, do sleep with try...catch