package unstar.server;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintStream;

/**
 * The main class for launching a server.
 */
public final class Launcher {

    /**
     * Hidden constructor.
     */
    private Launcher() {
    }

    /**
     * The main method, launches a server.
     * @param args  command line arguments
     */
    public static void main(final String[] args) {
        if (args.length != 1) {
            System.err.println("error: select one file to serve");
            System.exit(-1);
        }

        unstar.DeadSimpleFormatter.load();

        try {
            PrintStream out = new PrintStream(new File("valid.log"));
            File in = new File(args[0]);
            new Server(in, Server.DEFAULT_PORT, out).run();
        } catch (FileNotFoundException e) {
            System.err.println("File not found: " + e.getMessage());
            System.exit(-1);
        }
    }
}

@@ -76,16 +76,49 @@
 eption;%0A
+import java.io.FileOutputStream;%0A
 import j
@@ -660,20 +660,71 @@
     
-Prin
+File log = new File(%22valid.log%22);%0A            FileOutpu
 tStream 
 out 
@@ -719,16 +719,17 @@
 tStream 
+f
 out = ne
@@ -734,41 +734,93 @@
 new 
-PrintStream(new File(%22valid.log%22)
+FileOutputStream(log, true);%0A            PrintStream out = new PrintStream(fout, true
 );%0A 

Append to the valid code log rather than truncate.