public static void writeMemory(String path) {
        try (FileOutputStream fileOut = new FileOutputStream(("".equals(path) ? "pitmanager" : path));
                ObjectOutputStream out = new ObjectOutputStream(fileOut)) {
            out.writeObject(Competition.getInstance());
            out.close();
            fileOut.close();
        } catch (IOException e) {
            Logger.getLogger(SerializationManager.class.getName()).log(Level.SEVERE, null, e);
        }
    }