improved generator API to support writing step screenshot files