HX711 load sell and SD Card Datalogger problem

Hi . I am building model rocket engine test stand on base HX711 load sell.The code work perfect on Serial monitor and I able to collect data. But having laptop close to the stand is risky and dangerous. That why
I want to add SD card to the project to log on to it. Since my programing skills ar very poor I hope that someone is gona help me fix the code. This is my skech.

#include <SPI.h>
#include <SD.h>
#include "HX711.h" 
#include <LiquidCrystal.h>
LiquidCrystal lcd(8,9,4,5,6,7);
const int chipSelect = 10;
const int buttonPin = A2;      // start sequence button 
const int ledPin = A3;        //LED indicator and/or buzzer 
const int igniterPin = A1;   //igniter transistor circuit 
int buttonState = 0; 
const int DOUT = 3;
const int CLK = 2;
HX711 scale(DOUT,CLK);
float calibration_factor = -204; //-560 works for my 10kg loadcell.
File myFile;

void setup() {
  pinMode(buttonPin, INPUT);   
  pinMode(igniterPin, OUTPUT);  
  pinMode(ledPin, OUTPUT);   
  Serial.begin(9600);
  Serial.println("HX711 Rocket Motor Dynamometer, V.5");  
  Serial.println("Affix motor nozzle up. Place igniter in nozzle. Move away from test stand.");  
  Serial.println("Press start button to initialize ignition sequence."); 
  Serial.print("Initializing SD card...");
  if (!SD.begin(chipSelect)) {// see if the card is present and can be initialized:
  Serial.println("Card failed, or not present");
  // don't do anything more:
  return;
  }
  Serial.println("card initialized."); 
  // Create/Open file 
  
  lcd.begin(16,2); 
  lcd.clear(); 
  lcd.setCursor(0,0);   
  lcd.print("  MODEL ROCKET");  
  lcd.setCursor(0,1);   
  lcd.print("  DYNAMOMETER");  
  delay(2000);  
  scale.set_scale(10);   
  scale.tare(10); //Reset the scale to 0  
  long zero_factor = scale.read_average(); //Get a baseline reading  
  Serial.print("Zero factor: "); //This can be used to remove the need to tare the scale. Useful in permanent scale projects.  
  Serial.println(zero_factor);  
  Serial.println(" ");
  } 


void loop() {
  myFile = SD.open("test.txt", FILE_WRITE);
  lcd.clear();  
  lcd.setCursor(0,0);  
  lcd.print("  Rocket Dyno");  
  lcd.setCursor(0,1);  
  lcd.print("  STDBY " );   
  scale.set_scale(calibration_factor);   
  lcd.print(scale.get_units(),1);   
  lcd.print(" g");  
  delay(500);   
  buttonState = digitalRead(buttonPin);  
  if (buttonState == HIGH) { 

     lcd.clear();    
     lcd.setCursor(0,0);    
     lcd.print("  Rocket Dyno");    
     lcd.setCursor(0,1);    
     lcd.print("  STAND CLEAR!");    
     Serial.println("IGNITION SEQUENCE ACTIVATED!"); 

     for (int i=0; i <= 50; i++){              
       digitalWrite(ledPin, HIGH);      
       delay (100);       
       digitalWrite (ledPin,LOW);       
       delay (100);    
     } 
     lcd.clear();     
     lcd.setCursor(0,0);     
     lcd.print("  Rocket Dyno");     
     lcd.setCursor(1,1);     
     lcd.print(" AQUIRING DATA");    
     digitalWrite(igniterPin, HIGH);    
     Serial.print("Start time, ms: ");    
     Serial.print (millis());     
     Serial.println(" ");     
     Serial.println();
     for (int i=0; i <= 800; i++){        //800 samples at 80sa/sec = 10 seconds theoretical      
     scale.set_scale(calibration_factor); //Adjust to the calibration factor      
     Serial.print(scale.get_units(), 1); 
     myFile.print (scale.get_units(), 1);     
     Serial.println();
     myFile.close();    
     }     
     Serial.println();     
     Serial.print("Stop Time, ms: ");     
     Serial.print(millis());    
     digitalWrite (ledPin,LOW);    
     digitalWrite (igniterPin,LOW);    
     Serial.println();  
     }
    }

Use one of the included example to make sure your hardware aka SD card board is working right.

.