SD card module HW-125

Hello everyone !

I am creating a music generator with tone() function and i want to add a record feature to this project and for that purpose i am using SD card module HW-125 which works with 5V. I also have an LCD keypad shield attached to an I2C module in my project. So what i am trying to do is record the frequencies of generated notes in a different text file named 1 2 3 each time the user wants to record. I have written my code and made my connections for that and of course my program crashed. After debugging i saw that i could create files with different names each time like "1.txt","2.txt" but i could not write into those files. I have read that the reason of this thing happening is the voltage but i already feed my sd card module with competible voltage value. Might the reason be tone() function, as it blocks the pwm feature of pins numbered 3 and 11 since my MOSI pin is 11 ? By the way i am pretty new to this world so please excuse me being a newbie hahaha.
Thanks for your responses.

Hello again i figured it out. I used to get a warning like "Low memory available, stability problems may occur." I printed my strings with print(F(string)) method and it reduced memory usage. After that the problem is solved by its own