error checking for line fits