Check before delete.

*Add condition checker before delete file