[DEBUG #2 #7] close file and save it whan needed
[DEBUG #8] CLose the file after saving it when request close