Catch lexical_cast errors and add support for max labels to processing script