capture script contents in e$script_contents for use in testing