split FileStream out into its own module