fix errors.txt cleanup and pass tests