exception control when user stop application but record not stopping.