Added method to stop worker threads
Added check for hash to long conversion if selected size is too large
Improved worker thread stopping