--- ran.c.orig	2012-07-13 14:02:40.000000000 +0100
+++ ran.c	2014-09-06 18:16:26.206640079 +0100
@@ -94,6 +94,7 @@
 #include <stdlib.h>
 #include <math.h>
 #include <time.h>
+#include <string.h>
 
 #define ABS(x) ((x) >= 0 ? (x) : -(x))
 #define min(a,b) ((a) <= (b) ? (a) : (b))
@@ -114,10 +115,14 @@
 /* Seed the random number generator */
 {   
   FILE *outfile;
+  char path[BUFSIZ] = "";
+
   if (RANDOMIZE) 
     *seed = (int)time(NULL);
   srand(*seed);
-  outfile = fopen("seed.txt", "a");
+  strcpy(path, getenv("HOME"));
+  strcat(path, "/seed.txt");
+  outfile = fopen(path, "a");
   fprintf(outfile, "%i\n", *seed);
   fclose(outfile);
   /*  srand((int) time(NULL) );  */
