locate_errors function

Find errors in data