add checkFailingROC function + some improvements to output file writing