Improve sed for classifier and add error checking