@Override
    public void saveDefaultStudy(Study study) {
        if(study == null) {
            // If unsetting study, delete file
            File f = new File("./studies/.defaultstudy");
            f.delete();
            return;
        }
        
        PrintWriter out = null;
        try {
            // Write study name to file
            out = new PrintWriter("./studies/.defaultstudy");
            out.print(study.getName());
        } catch (FileNotFoundException ex) {
            // Can't do anything about this.
            Logger.getLogger(LocalConnection.class.getName()).log(Level.SEVERE, null, ex);
        } finally {
            // Close file.
            if(out != null)
                out.close();
        }
    }