saferunnoerror is expensive as it must fork and exec.  You should save the output and reuse it instead of running it twice.