split out file-simulation into its own module