Debug array and DB connection