Move away from deprecated API and use api.batch.fs.