Added debug output for validation