Better long file handling in SPI