built error checking for lineSplit function, and catch for its caller