Trying do detect error 6