Receiving varied Data from Bluetooth module and save it in file

hello, I want to make the app receive varied data from a Bluetooth module connected by Arduino the first problem is that the data when received, doesn't display line by line but overwrites each one I want to receive them line by line I'm already making this in code and the serial seems good. and after that how can I let this write in my files and when I press the button save. it should save all the data from the beginning till the last one I press the button