remove passwords in URLs from all log messages
also load error handler if debugging is enabled
Merge pull request #7013 from owncloud/dont_write_passwords_to_log

wrap stat() call in a try/catch block