Redone logging, fixed upload logic

Syncing with upstream
Merge pull request #30 from odcinek/logging

Redone logging, fixed upload logic