detect empty tars and mark them as such in database