public void convertAll()
    {
        inputFileName  = PostureDataHandler.instance.filePath + "ComfortEvaluationData" + UserStudyData.instance.fileEnding;
        outputFileName = PostureDataHandler.instance.filePath + "ComfortEvaluationCompressed" + UserStudyData.instance.fileEnding;
        read           = new StreamReader(inputFileName);
        string oldHeader = read.ReadLine();

        string[] endlArr = { ", " };
        first  = System.Array.IndexOf(oldHeader.Split(endlArr, System.StringSplitOptions.RemoveEmptyEntries), "RandomHandThumbIP");
        rating = System.Array.IndexOf(oldHeader.Split(endlArr, System.StringSplitOptions.RemoveEmptyEntries), "Rating");
        int currentRating;

        if (File.Exists(outputFileName))
        {
            File.Delete(outputFileName);
        }

        string endl       = ", ";
        string fileHeader =
            "Rating" + endl +
            Discomfort.getInterFingerCSVHeader(endl) +
            Discomfort.getAbductionCSVHeader(endl) +
            Discomfort.getHyperExtensionCSVHeader(endl) +
            Comfort.getRRPCSVHeader(endl);

        File.AppendAllText(outputFileName, fileHeader + System.Environment.NewLine);


        while (!read.EndOfStream)
        {
            string   dataLine = read.ReadLine();
            string[] input    = dataLine.Split(endlArr, System.StringSplitOptions.RemoveEmptyEntries);
            currentRating = int.Parse(input[rating]);
            handNew.parseCSV(input, first);

            File.AppendAllText(
                outputFileName,
                currentRating + endl +
                Discomfort.getInterFingerCSV(handNew, endl) +
                Discomfort.getAbductionCSV(handNew, endl) +
                Discomfort.getHyperExtensionCSV(handNew, endl) +
                Comfort.getRRPCSV(handNew, endl) +
                System.Environment.NewLine
                );
        }
        Debug.Log("Done!");
        read.Close();
    }
    // Use this for initialization
    void Start()
    {
        remaining = UserStudyData.instance.evaluations;
        fileName  = PostureDataHandler.instance.filePath + "ComfortEvaluationData" + UserStudyData.instance.fileEnding;

        string fileHeader =
            "Name" + endl +
            "Rating" + endl +
            "Discomfort" + endl +
            "Comfort" + endl +
            "InterDis" + endl +
            "AbductionDis" + endl +
            "HyperDis" + endl +
            Discomfort.getInterFingerCSVHeader(endl) +
            Discomfort.getAbductionCSVHeader(endl) +
            Discomfort.getHyperExtensionCSVHeader(endl) +
            Comfort.getRRPCSVHeader(endl) +
            AngleBasedHandModel.getCSVHeader(endl, "RandomHand");

        if (!File.Exists(fileName))
        {
            File.AppendAllText(fileName, fileHeader + Environment.NewLine);
        }
        else
        {
            StreamReader read      = new StreamReader(fileName);
            string       oldHeader = read.ReadLine();
            read.Close();
            if (!oldHeader.Equals(fileHeader))
            {
                Debug.Log("Fileheader not matching. Creating new file.");
                File.Delete(fileName);
                File.AppendAllText(fileName, fileHeader + Environment.NewLine);
            }
        }
        reset();
        if (UserStudyData.instance.right)
        {
            outputHand.transform.localScale = new Vector3(-outputHand.transform.localScale.x, outputHand.transform.localScale.y, outputHand.transform.localScale.z);
        }
    }
    // Use this for initialization
    void Start()
    {
        HandPostureUtils.reload();
        if (UserStudyData.instance.right)
        {
            hand = rightHand;
            palm = palmRight;
        }
        else
        {
            hand = leftHand;
            palm = palmLeft;
        }
        string fileHeader    = "Name" + endl + "UserEvaluation" + endl + "Discomfort" + endl + "Time" + endl + "Precision" + endl + "Postureholdtime" + endl + "TargetIndex" + endl + "Posture" + endl + "AngleDis" + endl + "InterDis" + endl + "YAxisDis" + endl + "HyperDis" + endl + AngleBasedHandModel.getCSVHeader(endl, "ActualHand") + endl + AngleBasedHandModel.getCSVHeader(endl, "GivenHand");
        string fileHeaderEnd =
            "Name" + endl +
            "Rating" + endl +
            "Time" + endl +
            "TrackingTime" + endl +
            "Discomfort" + endl +
            "Comfort" + endl +
            "InterDis" + endl +
            "AbductionDis" + endl +
            "HyperDis" + endl +
            Discomfort.getInterFingerCSVHeader(endl) +
            Discomfort.getAbductionCSVHeader(endl) +
            Discomfort.getHyperExtensionCSVHeader(endl) +
            Comfort.getRRPCSVHeader(endl) +
            AngleBasedHandModel.getCSVHeader(endl, "RandomHand");

        fileName    = PostureDataHandler.instance.filePath + "TargetShootingData" + UserStudyData.instance.fileEnding;
        fileNameEnd = PostureDataHandler.instance.filePath + "TargetShootingDataEnd" + UserStudyData.instance.fileEnding;

        if (!File.Exists(fileName))
        {
            File.AppendAllText(fileName, fileHeader + Environment.NewLine);
        }
        else
        {
            StreamReader read      = new StreamReader(fileName);
            string       oldHeader = read.ReadLine();
            read.Close();
            if (!oldHeader.Equals(fileHeader))
            {
                Debug.Log("Fileheader not matching. Creating new file.");
                File.Delete(fileName);
                File.AppendAllText(fileName, fileHeader + Environment.NewLine);
            }
        }

        if (!File.Exists(fileNameEnd))
        {
            File.AppendAllText(fileNameEnd, fileHeaderEnd + Environment.NewLine);
        }
        else
        {
            StreamReader read      = new StreamReader(fileNameEnd);
            string       oldHeader = read.ReadLine();
            read.Close();
            if (!oldHeader.Equals(fileHeaderEnd))
            {
                Debug.Log("Fileheader not matching. Creating new file.");
                File.Delete(fileNameEnd);
                File.AppendAllText(fileNameEnd, fileHeaderEnd + Environment.NewLine);
            }
        }


        remainingTargets = numTargets;
        if (UserStudyData.instance.right)
        {
            outputHand.transform.localScale = new Vector3(-outputHand.transform.localScale.x, outputHand.transform.localScale.y, outputHand.transform.localScale.z);
        }
        if (UserStudyData.instance.targetHand != null)
        {
            outputHand.visualizeHand(UserStudyData.instance.targetHand);
        }
        else
        {
            outputHand.gameObject.SetActive(false);
        }
    }