made scriptEngine final in ScriptRecordWriter