Fixed bug in writing to flash file table