Close file descriptor to avoid error.
Merge branch 'master' into diff-encode-snapshots