getPreprocessStream moved into separate module