Add validations and test for task status