Fix issues with task timeout and failure
Started code for better input validator