anchor.diff:  rem check if api call is made in automation flow file to set appropriate setting for phantomjs to work
   set api=
   if exist "%flow_file%" (
  -find /i /c "api http" "%flow_file%" > nul
  -if not errorlevel 1 set api= --web-security=false
  +	find /i /c "api http" "%flow_file%" > nul
  +	if not errorlevel 1 set api= --web-security=false
   )
   
   rem check datatable csv file for batch automation
  -
  +set tagui_data_set_size=1 
  +if not exist "%flow_file%.csv" goto no_datatable
  +	for /f "tokens=* usebackq" %%c in (`gawk -F"," "{print NF}" "%flow_file%.csv" ^| sort -nu ^| head -n 1`) do set min_column=%%c
  +	for /f "tokens=* usebackq" %%c in (`gawk -F"," "{print NF}" "%flow_file%.csv" ^| sort -nu ^| tail -n 1`) do set max_column=%%c
  +	
  +	if %min_column% neq %max_column% (
  +		echo ERROR - %flow_file%.csv has inconsistent # of columns | tee -a "%flow_file%.log"
  +	) else if %min_column% lss 2 (
  +		echo ERROR - %flow_file%.csv has has lesser than 2 columns | tee -a "%flow_file%.log"
  +	) else (
  +		set /a tagui_data_set_size=%min_column% - 1
  +	)
  +:no_datatable
   
   rem default exit code 0 to mean no error parsing automation flow file
   set tagui_error_code=0
   
   rem loop for managing multiple data sets in datatable
  -
  +for /l %%n in (1,1,%tagui_data_set_size%) do (
  +set tagui_data_set=%%n
   
   rem parse automation flow file and check for initial parse error before calling casperjs
   php -q tagui_parse.php "%flow_file%" | tee -a "%flow_file%.log"
  +for /f "usebackq" %%f in ('%flow_file%.log') do set file_size=%%~zf
  +if !file_size! gtr 0 (
  +	if !tagui_data_set! equ 1 (
  +		echo ERROR - automation aborted due to above | tee -a "%flow_file%.log"
  +		set tagui_error_code=1
  +		goto break_for_loop
  +	)
  +)
  +
   if %tagui_test_mode%==false (
  -casperjs "%flow_file%.js" %params%%api% | tee -a "%flow_file%.log"
  +	casperjs "%flow_file%.js" %params%%api% | tee -a "%flow_file%.log"
   ) else (
  -casperjs test "%flow_file%.js" %params%%api% --xunit="%flow_file%.xml" | tee -a "%flow_file%.log"
  -)
  +	casperjs test "%flow_file%.js" %params%%api% --xunit="%flow_file%.xml" | tee -a "%flow_file%.log"
  +)
  +
  +)
  +:break_for_loop
   
   rem additional windows section to convert unix to windows file format
   gawk "sub(\"$\", \"\")" "%flow_file%.js" > "%flow_file%.js.tmp"
  
positive.code: move "%flow_file%.log.tmp" "%flow_file%.log" > nul
  
  rem check report option to generate html automation log
  for /f "usebackq" %%a in ('%flow_file%.log') do set file_size=%%~za
  if %file_size% gtr 0 if %tagui_html_report%==true php -q tagui_report.php "%flow_file%"
  
  rem change back to initial directory where tagui is called
  cd /d "%initial_dir%"
  
negative.code: set tagui_test_mode=false
  rem check test parameter to run flow as casperjs test automation script
  if "%arg2%"=="test" (
  	set arg2=
  	set tagui_test_mode=true
  )
  if "%arg3%"=="test" (
  	set arg3=
  	set tagui_test_mode=true
  )
  if "%arg4%"=="test" (
  	set arg4=
  	set tagui_test_mode=true
  )
  if "%arg5%"=="test" (
  	set arg5=
  	set tagui_test_mode=true
  )
  if "%arg6%"=="test" (
  	set arg6=
  	set tagui_test_mode=true
  )
  if "%arg7%"=="test" (
  	set arg7=
  	set tagui_test_mode=true
  )
  if "%arg8%"=="test" (
  	set arg8=
  	set tagui_test_mode=true
  )
  if "%arg9%"=="test" (
  	set arg9=
  	set tagui_test_mode=true
  )
  
  set tagui_quiet_mode=false
  rem check quiet parameter to run flow quietly by only showing explicit output
  if "%arg2%"=="quiet" (
  	set arg2=
  	set tagui_quiet_mode=true
  )
  if "%arg3%"=="quiet" (
  	set arg3=
  	set tagui_quiet_mode=true
  )
  if "%arg4%"=="quiet" (
  	set arg4=
  	set tagui_quiet_mode=true
  )
  if "%arg5%"=="quiet" (
  	set arg5=
  	set tagui_quiet_mode=true
  )
  if "%arg6%"=="quiet" (
  	set arg6=
  	set tagui_quiet_mode=true
  )
  if "%arg7%"=="quiet" (
  	set arg7=
  	set tagui_quiet_mode=true
  )
  if "%arg8%"=="quiet" (
  	set arg8=
  	set tagui_quiet_mode=true
  )
  if "%arg9%"=="quiet" (
  	set arg9=
  	set tagui_quiet_mode=true
  )
  
  set tagui_html_report=false
  rem check report parameter to generate html formatted automation log
  if "%arg2%"=="report" (
  	set arg2=
  	set tagui_html_report=true
  )
  if "%arg3%"=="report" (
  	set arg3=
  	set tagui_html_report=true
  )
  if "%arg4%"=="report" (
  	set arg4=
  	set tagui_html_report=true
  )
  if "%arg5%"=="report" (
  	set arg5=
  	set tagui_html_report=true
  )
  if "%arg6%"=="report" (
  	set arg6=
  	set tagui_html_report=true
  )
  if "%arg7%"=="report" (
  	set arg7=
  	set tagui_html_report=true
  )
  if "%arg8%"=="report" (
  	set arg8=
  	set tagui_html_report=true
  )
  if "%arg9%"=="report" (
  	set arg9=
  	set tagui_html_report=true
  )
  
  rem concatenate parameters in order to fix issue when calling casperjs test
  