abstract out scriptfile