On ESP32 development – check your documentation
muscaw.dev
muscaw.dev
There was some problem with the filesystem getting corrupted, but I dont remember how it was. It may have been that I just wrote same file again and again without closing them handles.