Added more assertion to create task