little refactour QualityOutputResults

remove unneeded class field.
close resources after usage
remove unneded type cast