error code check not work, use string check instead