fixed crc write in file mode