Added data validation to tool mode