close local file when done uploading