Added a mode to dump template script as an independent script