bugfix: support empty URLs

also add some logging