switch to file-like streaming interface