add data directory and fix scripting file bugs