Fix infinite sleep, duplicate torrent fix

If a duplicate torrent is added return proper information.
When retrieving the folder name only try 10 times