Added command line option -o to export to output file