private void SaveTimestampDiffsToFile(HashMap<Integer, String> hashMap) {
        try (
                OutputStream file = new FileOutputStream("timestamps.ser");
                OutputStream buffer = new BufferedOutputStream(file);
                ObjectOutput output = new ObjectOutputStream(buffer);) {
            output.writeObject(hashMap);
        } catch (IOException ex) {
            logger.error("Cannot serialize object: " + ex.getMessage());
        }
    }