if ( checksum == data_checksum )
{
Serial.println(" OK");
close();
delay (10000);
}
The close() is being called here, when the CRC values match.
Why not remove the call to close if you do not want it to occur there.
If you think that the Arduino is firing off random functions, try again. loop() is called from a loop, so it will repeat, and repeat...