hide rm error
have go create/remove output directory
calculate below the diagonal, only truncate when distance==0