refactor(cloudcmd) readIndex: add callback