@Override
    public void close() {
        try {
            if (randomAccessFile != null) {
                randomAccessFile.close();
            }
        } catch (IOException ignored) {
        }
    }
Create the file and set length if not exists, and check the file size if exists.
s3stream/src/main/java/com/automq/stream/s3/wal/util/WALBlockDeviceChannel.java