add functions to validate script output (issue 1314)