Add stream support for `commit_file`