Added support to rerun taks if needed