SD card remove/reinstert button

Hello, i read many topics and i made a solution for my problem but I'm no sure this is a good practice.

I have data logger, which should be atleast 10 hour a day. I'll be writing maybe every minute.
Then if I wanna remove the sd card i will press a button which will call ISR function, which will call another function to close(.close()) the file.

Then I want to insert back. I will press another button and call other ISR function, which will call another function to open the file and write again..

I'm using nodemcu8266.

I do not see the need for an interrupt. Your loop() can happily poll the button and close the file if a button change from non-pressed to pressed is detected.

Same for the opening button.