check if to detects error