update script to write out command lines