Reorganize FLASH reading/writing