I don't like piping output to dev null; either the command should be changed to not generate the error ("rm -f"?), or use exec_cmd/3 to filter-out messages which are known to be OK from the output.