DDF-416 Correct logic to break out of loop on success

Second commit changes logic to only add size if URI is present.