diff --git a/src/basic_mod.F90 b/src/basic_mod.F90
index 6cf333936d5edc4796c4a04a6bd360c9ac4fc840..a0205cbc79f981d6e6e1c045de3e98168fa0a2e9 100644
--- a/src/basic_mod.F90
+++ b/src/basic_mod.F90
@@ -16,6 +16,7 @@ MODULE basic
   INTEGER :: cstep   = 0           ! Current step number (Init from restart file)
   LOGICAL :: RESTART = .FALSE.     ! Signal end of run
   LOGICAL :: nlend   = .FALSE.     ! Signal end of run
+  LOGICAL :: crash   = .FALSE.     ! Signal end of crashed run
 
   INTEGER :: ierr                  ! flag for MPI error
   INTEGER :: my_id                 ! identification number of current process
diff --git a/src/diagnose.F90 b/src/diagnose.F90
index eb72690607685e84509d46ef2a95247908c5748d..041d4f880fc087a6064aab6410b342000ec73bfb 100644
--- a/src/diagnose.F90
+++ b/src/diagnose.F90
@@ -261,7 +261,7 @@ SUBROUTINE diagnose(kstep)
 
      !   Close all diagnostic files
      CALL closef(fidres)
-     IF (nsave_cp .GT. 0) THEN
+     IF ((nsave_cp .GT. 0) .AND. (.NOT. crashed)) THEN
       CALL checkpoint_save(cp_counter)
       CALL closef(fidrst)
      ENDIF
diff --git a/src/tesend.F90 b/src/tesend.F90
index faffab8c0fb0e600ffcb624e276f9103a08cc90f..ec76bb15c3918180687f37033565f753d78937ec 100644
--- a/src/tesend.F90
+++ b/src/tesend.F90
@@ -14,6 +14,7 @@ SUBROUTINE tesend
      &             ierr)
   IF( mlend ) THEN
     nlend = .TRUE.
+    crash = .TRUE.
     IF (my_id .EQ. 0) WRITE(*,'(/a)') 'rhs are NaN/Inf'
     IF (my_id .EQ. 0) WRITE(*,*) 'Run terminated at cstep=',cstep
     RETURN