Renaming files on the SD card

Thank you for this. But still, I still cannot get SdFat to work like SD for whatever reason. While it works in the initial setup() it fails in loop(). It cannot seem to open or write to an SD file and even ListFiles(client, LS_SIZE) fails to list the existing files on the SD card. When switching back to SD lib, everything works.

Maybe the problem is obvious to you, or maybe I'm out of RAM. The program doesn't hang though, it still continues to print to HTTP, but ListFIles doesn't work and nothing gets written to the card.

Code split into two continuous pieces as follows: