Finished method to calculate confusion matrix an recorded log files