updated file loader to allow .json and .js files