Added commandline option for -R to export rawdata to a file