Simplify code: make open_stream() accept NULL file_format argument