private void writeFin(String user, int glID, String resName,
                          double cost, double cpu, double clock)
    {
        // Write into a results file
        FileWriter fwriter = null;
        try
        {
            fwriter = new FileWriter(user + "_Fin.csv", true);
        } catch (Exception ex)
        {
            ex.printStackTrace();
            System.out.println(
                    "Unwanted errors while opening file " + user + "_Fin.csv");
        }

        try
        {
            fwriter.write(user + ", "+ glID + ", " +
                resName + ", " + cost + ", "+ cpu + ", " + + clock + "\n");
        } catch (Exception ex)
        {
            ex.printStackTrace();
            System.out.println(
                    "Unwanted errors while writing on file " + user + "_Fin");
        }

        try
        {
            fwriter.close();
        } catch (Exception ex)
        {
            ex.printStackTrace();
            System.out.println(
                    "Unwanted errors while closing file " + user + "_Fin");
        }

    }