fix: check if file exists before deletion