- Remove the previous summary file is present to avoid showing stale contents from old summaries. - Extract the logic to write summary heading and lines to dedicated functions in output.sh to make it easier adding new formats in the future.