Esp32 crashing when trying to open file in FreeRTOS task

Both questions that would have been unnecessary to ask had @ar3dhel1 bothered to post the complete code from the very start.