changed createData to read only .js and .txt