Fix the error checking. Test the error checking.