fix delete for JSON files