replace return of empty URL with panic(err)