writing precision/recall to file and curve plotted