Have you verified that your serial connection is working, by printing something BEFORE calling SPIFFS.begin()? Follow the print with Serial.flush() to make sure the message goes out BEFORE you call SPIFFS.begin().
Also, have you initialized the SPIFFS filesystem? I have no idea what SPIFFS.begin() will do if it tries to open an uninitialized filesystem. Perhaps it handles that situation gracefully, perhaps not.
UKHeliBob:
It appears that SPIFFS has been deprecated in favour of LittleFS
Yes and no. On ESP8266 that is 100% true. On ESP32, SPIFFS is still the only FFS that can be installed through library manager or board manager, while SPIFFS is present, and supported, by default. That could change at any time, but right now, using SPIFFS is painless, while setting up LittleFS takes some effort.
Also, if you want the ability to push data files from your PC to SPIFFS, you should be aware that the availability of the "ESP8266 Sketch Data Upload" option in the Arduino IDE Tools Menu depends on which IDE / Board Package version you're using. It's present in 1.8.5 / 2.5.0, but NOT in 1.8.12 / 2.7.4. Not sure about versions in-between.