Why my excel is corrupted while i am stopping Katalon?

I cant do it since its credential, but i use excel for documenting means i write to excel about status on the case. For example, if i run the first column successful, i write to excel that the first column is success.
For the code itself, its similar to Katalon writing data to excel - #2 by grylion54
Also, i use some find row on excel. its similar to groovy - Katalon - get the no of rows in excel - Stack Overflow

I got my excel is corrupted from that 2.