use hashlib as md5 module is deprecated
add timeout feature to worker,  so it won't wait for something forever