Refactored batch cmd for setting data and index path into helper library