The script makes noisy error although fallback cmd succeed.
So make the script writes error log only if both of commands fail.
Bug: 124470143
Bug: 123664116
Test: m -j out/target/product/$(get_build_var TARGET_DEVICE)/shareduid_violation_modules.json
Test: And there is no error log in stderr
Change-Id: I3d4756066ee6904826c18754969fd4190bd02e1e