delete data and query files