Move getting session until after wait. Fixes #9936
Log failed delete of tmp files, see #9648
Revert "Log failed delete of tmp files, see #9648"

This reverts commit 0120ad8fcc9c0676bda24dc7d10a1526f3cac208.
Move logging of failed delete to util class, see #9648
Merge pull request #859 from ximenesuk/dropbox-9936-develop

DropBox bug fixes (rebased onto develop)