adding error checking to sorter to make sure sort columns are found