fixed the output file name and added firstCommit for arithmetics