Move input/output file information from globals to struct parameters