Fix optional successcallback crash bug of getFile() and getDirectory().