Import 'url' module correctly, move exception logger

Fix breakage on setting providerBackendIP, move logging earlier
to catch more errors

Change-Id: I73f3fbdd2255b7092add8beaa2fa2c0ad96a5c09
Merge remote-tracking branch 'gerrit/master' into deployment

Change-Id: I9febbb27af7fa29eb0929d978403cc9db56c5574