script generation: add logging
script generation: add metrics