split out readFile into a stream filter