added extra logic for stats missing relations + extra logging