fix upload incomplete file error