Beggining of write function (low level
SD card write doesn't work - fix it).