removed debug prints. added try except for task validation