 void BDTest(byte);
 void testLoadBuffer(void);
 void SDPrepare(void);
-bool SDFlush(uint32_t);
+void SDFlush(uint32_t);
 bool SDNewOpen(void);
 void SerialPrepare(void);
+void SDReCheck(uint32_t, uint32_t);
 
 void setup()
 {

			return 0;
	}
	return 1;
}

void BDTest(byte Test){

/*Each time when the sending time is larger than ~350ms the file is reopened. 
It is needed to confirm saved data which was sent before. Otherwise, if the controller stops working for some reason
the stored data will be lost.*/
void SDFlush(uint32_t t)
{
	if (t > 150000) {
		SerialUSB.println("SDFlush");
		myFile.flush();
			}
}

/*Planning to use this function to create another file when the data was recorded for ~1 hour*/
bool SDNewOpen(void) {
	//SerialUSB.println("SDNewOpen");
	char buffer[30];
	filenum++;
	if (filenum != 1) {
