Fix wrong args check in shareFile API.