implemented option -o/--csvout to put results in csv file
implements output to csv file (not great and clean but still)