Add logging
Fix unicode url paths
Add docstring