Changes to improve offline processing, including flush pipeline at end of file.