Modified minisat to append the output and cleaned up the random generator