Fix bug of transfering file data.